-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 related changes in CMakeLists.txt
#5186
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Anatoly Myachev <[email protected]>
CMakeLists.txt
Outdated
if(NOT MSVC) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_FORMAT_MACROS -fPIC -std=gnu++17") | ||
else() | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_FORMAT_MACROS /wd4244 /wd4624 /wd4715 /wd4530") |
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.
NIT: can you put all the error-related flags on line 139
CMakeLists.txt
Outdated
set(CMAKE_CXX_FLAGS_TRITONBUILDWITHO1 "-O1") | ||
else() | ||
set(CMAKE_C_FLAGS_TRITONRELBUILDWITHASSERTS "/Zi /Ob0 /Od /RTC1 /bigobj /Zc:preprocessor") | ||
set(CMAKE_CXX_FLAGS_TRITONRELBUILDWITHASSERTS "/Zi /Ob0 /Od /RTC1 /bigobj /Zc:preprocessor") |
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.
/Ob0
and /Od
are debug flags, not release?
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.
you're right, removed
Signed-off-by: Anatoly Myachev <[email protected]>
@peterbell10 thanks for review! Ready for another round. If I remember correctly we tried to compile the code and |
If it's not needed then I'd be fine with removing it. I guess #4976 removed the only use of builtins? |
I just want to say that if we remove |
There is at least one more biltins here: triton/lib/Tools/LinearLayout.cpp Line 481 in 54c840b
set(CMAKE_CXX_STANDARD 17) for GCC implicitly use -std=gnu++17 .
|
@woct0rdho I'm looking forward to this event, but it's unlikely to happen before PyTorch switches to the new standard (at least that's my current understanding) @peterbell10 I was wrong about |
@@ -306,6 +321,11 @@ if(NOT TRITON_BUILD_PYTHON_MODULE) | |||
endforeach() | |||
endif() | |||
|
|||
if(WIN32) | |||
option(CMAKE_USE_WIN32_THREADS_INIT "using WIN32 threads" ON) | |||
option(gtest_disable_pthreads "Disable uses of pthreads in gtest." ON) |
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.
Does this need to be hard-coded or can we use find_package(Threads REQUIRED)
?
Upstreaming some of our Windows related changes assuming that there is interest in this #5094 (comment) and hoping that it will not make it much more difficult to support this CMake file.