Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows native port #2478
base: main
Are you sure you want to change the base?
Windows native port #2478
Changes from 44 commits
1b87208
62cbe2c
022402d
69dee26
9382773
dbc280a
bcf7d94
f43486d
e3e8068
af38761
33fc428
f1c0970
fb33d3d
c992c68
9a68984
3b2ebf6
6c47d44
37a7e8e
fe2116b
726dab6
7c5c234
a3268ea
62774dc
ae77f77
34589f1
14bc5c2
97d2441
835497a
6b5a1d4
39d252a
14f01c8
ec7dff7
f57b7bf
42a6307
79937ce
34f2dce
506ee92
dc8a628
81b009a
1c985de
cb3bbf9
fad8e24
e9db820
289b1fe
74a1c93
a8cd2fa
12a097d
d15586c
36a1977
916613a
f017395
fdb63be
d940e61
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why
-std=gnu++17
is removed?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a redundant option as was discussed earlier in this PR. C++ level is defined by CMAKE_CXX_STANDARD and we had it defined here https://github.com/intel/intel-xpu-backend-for-triton/pull/2478/files#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20aL11 but now it was moved into condition for Linux/Windows because MSVC is unable to parse some of the templates on level 17 so it needs 20, while gcc refuses to compile code on level 20 https://github.com/intel/intel-xpu-backend-for-triton/pull/2478/files#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20aR37 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make this change upstream?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't
set(CMAKE_CXX_STANDARD 17)
correspond to-std=c++17
, not-std=gnu++17
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is
-std=gnu++17
necessary? Looks like all tests in this PR pass without it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Triton project has been using this extension for a very long time, for example I found a mention of
gnu++11
in triton-lang/triton@50587bb. Even if we assume that all code, not just the one being tested, does not use this extension, it is unlikely that they will decide to remove something that they have been using for a long time.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then it might be some legacy like Windows build support that Triton inherited from previous projects and by now nobody knows why it was added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we reuse code from
CLFinder.py
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can and it should work in theory, but it doesn't. For some reason when I import these functions from CLFinder I am getting an error
LINK : fatal error LNK1168: cannot open C:\b\tr\python\triton\_C\libtriton.pyd for writing
. I have no idea how they are related but this link error is stably reproducible for me. I tried to debug the problem and found that environment after callingset_env_vars
is identical when functions are reused from CLFinder.py or setup.py has its own copies, so now I am out of ideas how libtryton.pyd may end up locked.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me it works only if I specify
-products
:"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version "[17.0,18.0)" -products Microsoft.VisualStudio.Product.BuildTools -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath -prerelease
@gshimansky do you know why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me it works just fine if I don't specify
-products
or if I specify-products "*"
. Specifying-products Microsoft.VisualStudio.Product.BuildTools
doesn't find anything for me but specifying-products Microsoft.VisualStudio.Product.Professional
does.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-products "*"
works for me too. It seems that this is because I did not install the entire studio, but only the build tools. Should we add-products "*"
to allow this case?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know whether it may result in multiple different products found as the result, but we can add it for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about that too. But couldn't it be the same default behavior when
-products
parameter is not specified at all?