File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -110,16 +110,20 @@ def compileAmd():
110110
111111 # compile hiprt traversal code
112112 hiprt_lib = hiprtlibpath + 'hiprt' + hiprt_ver + '_' + hip_version + '_amd_lib' + postfix
113-
113+
114+ if isLinux ():
115+ osDef = "-DHIPCC_OS_LINUX"
116+ else :
117+ osDef = "-DHIPCC_OS_WINDOWS"
114118
115119 # compile custom function table
116120 hiprt_custom_func = 'hiprt' + hiprt_ver + '_' + hip_version + '_custom_func_table.bc'
117- cmd = hipccpath + ' -O3 -std=c++17 ' + targets + ' -fgpu-rdc -c --gpu-bundle-output -c -emit-llvm -I../../ -ffast-math ../../test/bitcodes/custom_func_table.cpp -parallel-jobs=15 -o ' + hiprt_custom_func
121+ cmd = hipccpath + ' -O3 -std=c++17 ' + targets + ' -fgpu-rdc -c --gpu-bundle-output -c -emit-llvm -I../../ ' + osDef + ' -ffast-math ../../test/bitcodes/custom_func_table.cpp -parallel-jobs=15 -o ' + hiprt_custom_func
118122 compileScript ('compiling ' , cmd , hiprt_custom_func )
119123
120124 # compiling unit test
121125 hiprt_unit_test = 'hiprt' + hiprt_ver + '_' + hip_version + '_unit_test' + postfix
122- cmd = hipccpath + ' -O3 -std=c++17 ' + targets + ' -fgpu-rdc -c --gpu-bundle-output -c -emit-llvm -I../../ -ffast-math -D BLOCK_SIZE=64 -D SHARED_STACK_SIZE=16 ../../test/bitcodes/unit_test.cpp -parallel-jobs=15 -o ' + hiprt_unit_test
126+ cmd = hipccpath + ' -O3 -std=c++17 ' + targets + ' -fgpu-rdc -c --gpu-bundle-output -c -emit-llvm -I../../ ' + osDef + ' -ffast-math -D BLOCK_SIZE=64 -D SHARED_STACK_SIZE=16 ../../test/bitcodes/unit_test.cpp -parallel-jobs=15 -o ' + hiprt_unit_test
123127 compileScript ('compiling ' , cmd , hiprt_unit_test )
124128
125129 # linking
You can’t perform that action at this time.
0 commit comments