MLIR on Windows?

245 views
Skip to first unread message

Vinod Grover

unread,
Apr 8, 2019, 12:03:01 AM4/8/19
to ml...@tensorflow.org

Given that Tensorflow is available on Windows, I was wondering if there are any near term plans to port MIR to Windows?

 

Best

Vinod

 


This email message is for the sole use of the intended recipient(s) and may contain confidential information.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.

Mehdi AMINI

unread,
Apr 8, 2019, 5:08:59 AM4/8/19
to Vinod Grover, ml...@tensorflow.org
Hi Vinod,

Yes we will have to align the supported platform for MLIR to what TensorFlow and LLVM are supporting. I don't have a precise timeline at this point, but I expect it to be done in the coming months.

Best,

-- 
Mehdi



--
You received this message because you are subscribed to the Google Groups "MLIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mlir+uns...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/mlir/MWHPR12MB1694052579FAC93259C6A332C52C0%40MWHPR12MB1694.namprd12.prod.outlook.com.

loic...@sonarsource.com

unread,
Apr 17, 2019, 8:13:26 AM4/17/19
to MLIR
Hello,

Do you have any idea on how this support on windows would work? More specifically, do you intend to have it built by compilers other than clang (i.e. MsVC?)

Do you think there are any serious reasons that would make a windows version difficult to have? Or is this probably just a matter of testing and small adjustments? I'm asking because if it's the second, I might try to spend some time doing it...

--- 
Loïc Joly

Jacques Pienaar

unread,
Apr 17, 2019, 8:29:54 AM4/17/19
to loic...@sonarsource.com, MLIR
Hey Loïc,

I believe it to be in the 2nd category. At least for clang, but for MSVC not sure as I haven't used it in more than a decade. It would be great if you could look at it and report back problems and we can work together on addressing them.

Thanks,

Jacques

--
You received this message because you are subscribed to the Google Groups "MLIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mlir+uns...@tensorflow.org.

Chris Lattner

unread,
Apr 17, 2019, 12:12:31 PM4/17/19
to Jacques Pienaar, loic...@sonarsource.com, MLIR
We aspire to be buildable by whatever compilers are currently supported by the LLVM project.  I’m pretty sure that includes MSVC, but I don’t think we’ve tested it.

-Chris

loic...@sonarsource.com

unread,
Apr 19, 2019, 5:03:15 AM4/19/19
to MLIR
Hello,

I just successfully build MLIR with visual studio. I'm now trying to understand why some tests are failing (or why they are working currently :) ). I had to make several changes in the code to achieve that. Some seem legit to me, some are a little bit more hackish... . I read that you are not yet ready to accept community contribution, but if you want to, I can make those changes available to you anyways, just tell me the preferred way.

--- 
Loïc

Jacques Pienaar

unread,
Apr 19, 2019, 5:25:41 AM4/19/19
to loic...@sonarsource.com, MLIR
Hey Loic,

Thats great that you have it working (modulo tests failing* ;-)). Have you signed the Google CLA? (https://cla.developers.google.com/). Post that I think it would be easier to discuss (creating a PR is an option by way of showing the problems that needed to be address).

Thanks,

Jacques

* I know of one test currently failing externally (issue 17) that we have fixed internally but we haven't pushed that out yet, but may later today.

--
You received this message because you are subscribed to the Google Groups "MLIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mlir+uns...@tensorflow.org.

loic...@sonarsource.com

unread,
Apr 19, 2019, 7:28:45 AM4/19/19
to MLIR
Maybe someone can help me on this one: https://github.com/tensorflow/mlir/blob/master/test/AffineOps/canonicalize.mlir contains: 
// RUN: mlir-opt %s -split-input-file -canonicalize

When I run it, I have the error:
mlir-opt.exe: Unknown command line argument '-canonicalize'.  Try: 'C:\Dev\llvm-project\build\release\bin\mlir-opt.exe -help'

I looked into mlir-opt, and I could not see any option looking like canonicalize

Any idea?

---
Loïc
To unsubscribe from this group and stop receiving emails from it, send an email to ml...@tensorflow.org.

Alex Zinenko

unread,
Apr 19, 2019, 7:33:50 AM4/19/19
to MLIR
Looks like the library containing the canonicalization pass did not get linked into mlir-opt binary.  MLIR passes are attached at link time using static initializers, so you may need to forcibly link pass libraries beacuse there are no symbols used by mlir-opt that belong to those libraries

To unsubscribe from this group and stop receiving emails from it, send an email to mlir+uns...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/mlir/75e1274d-a157-4f0c-a43b-c9538ccc7e3c%40tensorflow.org.


--
-- Alex

Jacques Pienaar

unread,
Apr 19, 2019, 7:37:04 AM4/19/19
to Alex Zinenko, MLIR
Yes the whole_archive_link rule in https://github.com/tensorflow/mlir/blob/master/CMakeLists.txt might need to be updated for windows.

-- Jacques

loic...@sonarsource.com

unread,
Apr 19, 2019, 8:24:00 AM4/19/19
to MLIR
Thank you, I updated the whole_archive_link rule, and it now has many more options :)

Next step: -emit=ast generates an AST with windows paths, that is then compared to unix paths, which obviously fails... I'm not sure how to approach this. I've seen some use of {{[/\\]}} in some test cases of LLVM, but it seems overly verbose... Maybe the best would be to canonicalize the path during -emit=ast? Any opinion there?



--
-- Alex

--
You received this message because you are subscribed to the Google Groups "MLIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ml...@tensorflow.org.

Mehdi AMINI

unread,
Apr 19, 2019, 1:21:11 PM4/19/19
to loic...@sonarsource.com, MLIR
Ah, that's the Toy tutorial right?

If you have a way to canonicalize the path to use the Unix syntax it would be nice. Maybe some utilities in LLVM Support can do this?

-- 
Mehdi


To unsubscribe from this group and stop receiving emails from it, send an email to mlir+uns...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/mlir/2c5e52b7-5447-4404-966c-101ec22951a1%40tensorflow.org.

loic...@sonarsource.com

unread,
Apr 19, 2019, 2:40:07 PM4/19/19
to MLIR
Yes, that was only needed for the toy tutorial. I did it manually, replacing '\' with '/'4 of the 5 toy tests now work correctly. Unfortunately, other tests have issues that are not so easy to find, especially when you don't know what is the expected output...

As it is now, when I run the check-mlir target in release mode, I have 116 successful tests, and 25 failures.


I also have issues with the debug builds, I'm not sure exactly why... It looks like the issue on static object being removed applies also for command line option, while they work in release mode... :(

Anyway, I made a PR with my changes, you can have a look at it: https://github.com/tensorflow/mlir/pull/22 (if you prefer that I create a pull request local to my fork, tell me so, I will change it).

loic...@sonarsource.com

unread,
Apr 25, 2019, 2:16:55 PM4/25/19
to MLIR
Did the colleague who wanted to work on the windows port have time to look at my PR to see if it can help him?
I must put this on hold for now, but may come back to it in one week...

Lei Zhang

unread,
Apr 25, 2019, 8:33:03 PM4/25/19
to loic...@sonarsource.com, MLIR
Hi Loïc, I'll take a look of building MLIR on Windows. Much appreciated for your PR; it definitely helps! :)

Thanks,
Lei


To unsubscribe from this group and stop receiving emails from it, send an email to mlir+uns...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/mlir/ad5c0fe5-f4e8-44ed-aa62-f45e4f19f484%40tensorflow.org.

ming

unread,
Aug 4, 2020, 11:29:57 PM8/4/20
to MLIR
Hello,After I build MLIR with visua studio 2019,I can't find bin directory under build directory.can you help me?

Jacques Pienaar

unread,
Aug 7, 2020, 3:02:54 PM8/7/20
to ming, MLIR
Hey,

Via bazel https://docs.bazel.build/versions/master/output_directories.html shows the main directories where output is generated (if you build one cc_binary target bazel reports the full path too). If you are referring to building the part in LLVM via cmake, those tend to end up in tools dir under the build directory (but I haven't build on windows there).

It would help if you said what target your are building and how.

-- Jacques

--
You received this message because you are subscribed to the Google Groups "MLIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mlir+uns...@tensorflow.org.
Reply all
Reply to author
Forward
0 new messages