Skip to content

Commit

Permalink
Updated generated filenames in run_command.sh (#3805)
Browse files Browse the repository at this point in the history
In #3788, the filename pattern `__tmp_kernel*.cu` was updated to
`__tmp_*.cu` in `compare_codegen.sh`. That fix was incomplete, because
`run_command.sh` also needs to move the generated files. This fix
implements that change. I think this should finally fix codediff.
  • Loading branch information
jacobhinkle authored Feb 4, 2025
1 parent 212ac38 commit 4205803
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/codediff/run_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ fi
mkdir -p "$testdir"
movecudafiles() {
mkdir -p "$1/cuda" "$1/ptx"
find . -maxdepth 1 -name '__tmp_kernel*.cu' -print0 | xargs -0 --no-run-if-empty mv -t "$1/cuda"
find . -maxdepth 1 -name '__tmp_kernel*.ptx' -print0 | xargs -0 --no-run-if-empty mv -t "$1/ptx"
find . -maxdepth 1 -name '__tmp_*.cu' -print0 | xargs -0 --no-run-if-empty mv -t "$1/cuda"
find . -maxdepth 1 -name '__tmp_*.ptx' -print0 | xargs -0 --no-run-if-empty mv -t "$1/ptx"
}
removecudafiles() {
tmpdir="./.nvfuser_run_command_tmp"
Expand All @@ -140,8 +140,8 @@ then
fi

cleanup() {
numcu=$(find . -maxdepth 1 -name '__tmp_kernel*.cu' | wc -l)
numptx=$(find . -maxdepth 1 -name '__tmp_kernel*.ptx' | wc -l)
numcu=$(find . -maxdepth 1 -name '__tmp_*.cu' | wc -l)
numptx=$(find . -maxdepth 1 -name '__tmp_*.ptx' | wc -l)
if (( numcu + numptx > 0 ))
then
echo "Interrupted. Removing $numcu temporary .cu files and $numptx temporary .ptx files"
Expand Down

0 comments on commit 4205803

Please sign in to comment.