-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
al-ro
committed
Jan 18, 2024
1 parent
dab68e9
commit 3bad0bf
Showing
8 changed files
with
101 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
echo "Running profiling..." | ||
|
||
threads=(10 8 4 2 1) | ||
|
||
width=1500 | ||
height=800 | ||
samples=100 | ||
|
||
echo -e "width: $width \theight: $height \tsamples: $samples \tthreads: ${threads[*]}" | ||
|
||
prefix="Render time:" | ||
|
||
function cancel { | ||
echo "Received SIGQUIT. Exiting." | ||
exit 0; | ||
} | ||
|
||
trap cancel SIGQUIT | ||
|
||
for scene in `seq 0 2` | ||
do | ||
echo -n "GPU BVH $scene..." | ||
file="GPU_BVH"$scene".out" | ||
./PathTracer -w $width -h $height -p $scene -d 0 -a 1>$file | ||
timing="$(grep "$prefix" $file)" | ||
echo "$timing" | sed -e "s/^$prefix//" | ||
done | ||
|
||
for scene in `seq 0 2` | ||
do | ||
echo -n "GPU scene $scene..." | ||
file="GPU_scene"$scene".out" | ||
./PathTracer -w $width -h $height -s $samples -p $scene -d 0 1>$file | ||
timing="$(grep "$prefix" $file)" | ||
echo "$timing" | sed -e "s/^$prefix//" | ||
done | ||
|
||
for scene in `seq 0 2` | ||
do | ||
for i in ${threads[@]} | ||
do | ||
echo -n "CPU BVH $scene threads $i..." | ||
file="CPU_BVH_"$scene"_threads_"$i".out" | ||
./PathTracer -w $width -h $height -p $scene -d 1 -t $i -a 1>$file | ||
timing="$(grep "$prefix" $file)" | ||
echo "$timing" | sed -e "s/^$prefix//" | ||
done | ||
done | ||
|
||
for scene in `seq 0 2` | ||
do | ||
for i in ${threads[@]} | ||
do | ||
echo -n "CPU scene $scene threads $i..." | ||
file="CPU_scene_"$scene"_threads_"$i".out" | ||
./PathTracer -w $width -h $height -s $samples -p $scene -d 1 -t $i 1>$file | ||
timing="$(grep "$prefix" $file)" | ||
echo "$timing" | sed -e "s/^$prefix//" | ||
done | ||
done |