Skip to content

Commit f87204c

Browse files
committed
fix windows host issue
1 parent 5572055 commit f87204c

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

gatherData.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def download_files_for_some_targets(targets):
135135

136136
elif 'permutate' in basename:
137137
tFile = os.path.normpath(f'{srcDir}/../permutate-cuda/test_data/truerand_1bit.bin')
138-
command = f'git clone https://github.com/yeah1kim/yeah_GPU_SP800_90B_IID ./permutate-cuda && cp -r ./permutate-cuda/test_data {srcDir}/../permutate-cuda/test_data'
138+
command = f'git clone --verbose https://github.com/yeah1kim/yeah_GPU_SP800_90B_IID ./permutate-cuda && cp -r ./permutate-cuda/test_data/ {srcDir}/../permutate-cuda/test_data'
139139
if not os.path.isfile(tFile):
140140
result = subprocess.run(command, cwd=DOWNLOAD_DIR, shell=True)
141141
assert result.returncode == 0
@@ -344,8 +344,13 @@ def get_runnable_targets():
344344
basename = os.path.basename(entry)
345345
execSrcDir = os.path.abspath(f'{SRC_DIR}/{basename}')
346346

347+
if ('.cpp' in basename) or ('.c' in basename) or ('.o' in basename) or ('.so' in basename):
348+
# skip non-executable files
349+
# this happens when we source from windows systems -- cpp files are seen as executables
350+
continue
351+
347352
# check we have the source code too
348-
assert os.path.isdir(execSrcDir)
353+
assert os.path.isdir(execSrcDir), f'Could not find source dir for executable {basename} at expected location: {execSrcDir} ({SRC_DIR}/{basename}) entry: {entry}'
349354
assert execSrcDir != ''
350355

351356
execDict = {'basename':basename,
@@ -797,10 +802,10 @@ def execute_target(target:dict, kernelName:str):
797802
#ncuCommand = f'ncu -f -o {reportFileName} --section SpeedOfLight_RooflineChart -c 2 -k "regex:{kernelName}"'
798803
# without clock-control=none, the GPU executes at the base/default clock speed that NCU selects for it
799804
#ncuCommand = f'ncu -f -o {reportFileName} --clock-control=none --set roofline --metrics smsp__sass_thread_inst_executed_op_integer_pred_on -c 2 -k "regex:{kernelName}"'
800-
ncuCommand = f'ncu -f -o {reportFileName} --set roofline --metrics smsp__sass_thread_inst_executed_op_integer_pred_on -c 2 -k "regex:{kernelName}"'
805+
ncuCommand = f'ncu -f -o {reportFileName} --set roofline --metrics smsp__sass_thread_inst_executed_op_integer_pred_on -c 2 -k "{kernelName}"'
801806
exeCommand = f'{ncuCommand} {BUILD_DIR}/{basename} {exeArgs}'.rstrip()
802807

803-
print('executing command:', exeCommand)
808+
print('executing command:', exeCommand, flush=True)
804809

805810
# we print the stderr to the stdout for analysis
806811
# 15 minute timeout for now?

0 commit comments

Comments
 (0)