File tree Expand file tree Collapse file tree 5 files changed +51
-0
lines changed
unit_tests/synthetic/libraries Expand file tree Collapse file tree 5 files changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -404,6 +404,8 @@ if(HIPIFY_CLANG_TESTS OR HIPIFY_CLANG_TESTS_ONLY)
404404
405405 if (CUDA_FILE_ROOT_DIR STREQUAL "" )
406406 set (CUDA_FILE_ROOT_DIR OFF )
407+ else ()
408+ set (CUDA_FILE_ROOT_DIR "${CUDA_FILE_ROOT_DIR} /include" )
407409 endif ()
408410
409411 message (STATUS "Found CUDA config:" )
Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ config.excludes = ['cmdparser.hpp']
1616config .excludes .append ('spatial_batch_norm_op.h' )
1717config .excludes .append ('common_cudnn.h' )
1818config .excludes .append ('inc.h' )
19+ config .excludes .append ('inet.h' )
20+ config .excludes .append ('types.h' )
21+ config .excludes .append ('socket.h' )
1922
2023delimiter = "===============================================================" ;
2124print (delimiter )
Original file line number Diff line number Diff line change 1+ // Fake arpa/inet.h to appease cuFile testing on Windows
2+ #pragma once
3+
4+ #ifdef _WIN32
5+ #ifndef WIN32_LEAN_AND_MEAN
6+ #define WIN32_LEAN_AND_MEAN
7+ #endif
8+ #include <winsock2.h>
9+ #include <ws2tcpip.h>
10+ #else
11+ // On Linux, bypass this shim and load the real system header
12+ #include_next <arpa/inet.h>
13+ #endif
Original file line number Diff line number Diff line change 1+ // Fake sys/socket.h to appease cuFile testing on Windows
2+ #pragma once
3+
4+ #ifdef _WIN32
5+ #ifndef WIN32_LEAN_AND_MEAN
6+ #define WIN32_LEAN_AND_MEAN
7+ #endif
8+ #include <winsock2.h>
9+
10+ // Sometimes Windows needs this for types like ssize_t
11+ #include <BaseTsd.h>
12+ typedef SSIZE_T ssize_t ;
13+ #else
14+ // On Linux, bypass this shim and load the real system header
15+ #include_next <sys/socket.h>
16+ #endif
Original file line number Diff line number Diff line change 1+ // Fake sys/types.h to appease cuFile testing on Windows
2+ #pragma once
3+
4+ // ALWAYS load the real system header first (works for Windows SDK and Linux glibc)
5+ #include_next <sys/types.h>
6+
7+ // 2. Add our Linux missing types
8+ #ifdef _WIN32
9+ #include <stdint.h>
10+
11+ // Define the Linux 64-bit file offset type for Windows
12+ typedef int64_t loff_t ;
13+ typedef int64_t off64_t ;
14+
15+ // (Optional) Include corecrt just in case standard sys/types.h misses it
16+ #include <corecrt.h>
17+ #endif
You can’t perform that action at this time.
0 commit comments