-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add macOS support #5
base: chipStar
Are you sure you want to change the base?
Conversation
ihipEvent ihipCtx_t ihipStream_t ihipModule_t, ihipModuleSymbol_t hipGraph
fix catch2 test discovery extent test disabling to SPIRV fmt merge tests from CHIP-SPV fix standalone test link HipTest::launchKernel workaround for hipHostMalloc adjust hipHostMalloc test wait time 5000->5 s
This reverts commit 910202a.
That's undefined/suspicious behavior. At least it should be (not explicitly spelled out by the CUDA PM).
set(CMAKE_CXX_COMPILER "${HIP_PATH}/bin/hipcc.bin") | ||
set(CMAKE_C_COMPILER "${HIP_PATH}/bin/hipcc.bin") | ||
set(CMAKE_CXX_COMPILER "${HIP_PATH}/bin/hipcc") | ||
set(CMAKE_C_COMPILER "${HIP_PATH}/bin/hipcc") |
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.
This should make it possible to use the perl wrapper
set(CMAKE_CXX_COMPILER "${HIP_PATH}/bin/hipcc.bin") | ||
set(CMAKE_C_COMPILER "${HIP_PATH}/bin/hipcc.bin") | ||
set(CMAKE_CXX_COMPILER "${HIP_PATH}/bin/hipcc") | ||
set(CMAKE_C_COMPILER "${HIP_PATH}/bin/hipcc") | ||
set(HIPCONFIG_EXECUTABLE "${HIP_PATH}/bin/hipconfig.bin") |
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.
Should be changed to hipconfig
so it uses the perl wrapper
@@ -231,7 +231,7 @@ function(catch_executable src) | |||
|
|||
message("Standalone Catch test: ${exec_name} ${src}") | |||
add_executable(${exec_name} EXCLUDE_FROM_ALL ${src} $<TARGET_OBJECTS:Main_Object_Standalone> $<TARGET_OBJECTS:KERNELS>) | |||
target_link_libraries(${exec_name} PRIVATE stdc++fs -pthread ) | |||
target_link_libraries(${exec_name} PRIVATE -pthread ) |
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.
stdc++fs
is spammed all over the HIP codebases, despite often requiring c++17 or newer and with bad conditions.
These changes might break it for some users, but rather than adding it manually, we should be using CMake to add filesystem support, OR, require c++17 through CMake and then fail.
#elif defined(__APPLE__) || defined(__MACOSX) | ||
#define HT_WIN 0 | ||
#define HT_LINUX 0 | ||
#define HT_MACOS 1 |
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 have no idea where these new flags are used.
The existing code quality here is pretty horrible.
@@ -25,6 +25,8 @@ THE SOFTWARE. | |||
|
|||
#ifdef __linux__ | |||
#include <sys/sysinfo.h> | |||
#elif defined(__APPLE__) || defined(__MACOSX) | |||
// No-op |
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.
Should probably be different
@@ -176,7 +176,7 @@ endif() | |||
|
|||
# skipped due to os related code in tests | |||
# need to work on them when all the tests are enabled | |||
if(UNIX) | |||
if(UNIX AND NOT APPLE) |
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.
These tests might be portable. I didn't check yet.
|
||
*total = (vmstat.wire_count + vmstat.active_count + vmstat.inactive_count + vmstat.free_count + Pages occupied by compressor + Pages speculative) * pageSize; | ||
*free = vmstat.free_count * pageSize; | ||
#endif |
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.
This still needs to be activated. Consider it WIP
(I'll add a description later)
Part of CHIP-SPV/chipStar#602