Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test main #2

Merged
merged 34 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c61ec8c
Simplify flow
minhpham160603 Jun 10, 2024
dad1c33
transform mesh
minhpham160603 Jun 10, 2024
d45e7c1
Merge branch 'main' into test_main
minhpham160603 Jun 11, 2024
f0e3f06
Revert "transform mesh"
minhpham160603 Jun 11, 2024
009fc9d
Add 2 different implementations for benchmarking
minhpham160603 Jun 11, 2024
611e483
add benchmark
souhhcong Jun 11, 2024
5958bf4
Add realtime rendering
minhpham160603 Jun 11, 2024
f99d24d
Merge branch 'test_main' of https://github.com/souhhcong/RaytracingGP…
minhpham160603 Jun 11, 2024
5c430f6
Update share_mem
the-nguyen Jun 11, 2024
3d0971d
fix
the-nguyen Jun 11, 2024
9086277
Finalize realtime
minhpham160603 Jun 11, 2024
4cd8df0
Merge branch 'test_main' of https://github.com/souhhcong/RaytracingGP…
minhpham160603 Jun 11, 2024
80593ee
fix share_mem
the-nguyen Jun 11, 2024
b5ddb45
Add gif
minhpham160603 Jun 11, 2024
939e25a
Merge branch 'test_main' of https://github.com/souhhcong/RaytracingGP…
minhpham160603 Jun 11, 2024
65a1fc1
rename shared_memory
the-nguyen Jun 11, 2024
018c18e
move gif to /gif
minhpham160603 Jun 11, 2024
c774255
Merge branch 'test_main' of https://github.com/souhhcong/RaytracingGP…
the-nguyen Jun 11, 2024
aa21292
Update README.md
minhpham160603 Jun 11, 2024
dc104fa
Update README.md
minhpham160603 Jun 11, 2024
c92723a
experiment: move arr vertices to shared memory
the-nguyen Jun 11, 2024
ff0e4d8
remove texture memory for BVH
the-nguyen Jun 11, 2024
624287e
modify tree travesal for more coalesced global mem access
the-nguyen Jun 11, 2024
e57ff6d
reduce grid size
the-nguyen Jun 12, 2024
dda7da1
remove h_colors
the-nguyen Jun 12, 2024
77d9c6b
benchmark bvh array vs tree
the-nguyen Jun 12, 2024
87ef21c
clean the most optimized version
the-nguyen Jun 12, 2024
b0aa22a
rename the most optimized version
the-nguyen Jun 12, 2024
b588468
benchmark uneffectiveness of vertices in shared
the-nguyen Jun 12, 2024
f24035c
fix comments
the-nguyen Jun 12, 2024
e94f5cb
benchmark non-coalesced
the-nguyen Jun 12, 2024
3dae864
fix image name
the-nguyen Jun 12, 2024
3843bbe
benchmark BVH-tree
the-nguyen Jun 12, 2024
918d306
benchmark texture memory
the-nguyen Jun 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@
.nfs*
*.png
raytracer
profile.*
profile.*
array_bvh
shared
global
realtime
cpu
34 changes: 31 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,35 @@
NVCC = /usr/local/cuda/bin/nvcc

raytracer:
$(NVCC) raytracer.cu -o raytracer -O3 -arch=sm_75 -std=c++17 -I/usr/local/cuda/include
LDLIBS = -lglut -lGL -lGLU -lm -lGLEW

all: global optimized realtime array_bvh cpu optimized_vertices-in-shared optimized_non-coalesced optimized_bvh-tree optimized_bvh-texture

realtime:
$(NVCC) realtime_render.cu -o realtime -O3 -arch=sm_75 -std=c++17 -I/usr/local/cuda/include $(LDLIBS)

global:
$(NVCC) global_launcher.cu -o global -O3 -arch=sm_75 -std=c++17 -I/usr/local/cuda/include

array_bvh:
$(NVCC) array_bvh.cu -o array_bvh -O3 -arch=sm_75 -std=c++17 -I/usr/local/cuda/include

optimized:
$(NVCC) optimized.cu -o optimized -O3 -arch=sm_75 -std=c++17 -I/usr/local/cuda/include

optimized_vertices-in-shared:
$(NVCC) optimized_vertices-in-shared.cu -o optimized_vertices-in-shared -O3 -arch=sm_75 -std=c++17 -I/usr/local/cuda/include

optimized_non-coalesced:
$(NVCC) optimized_non-coalesced.cu -o optimized_non-coalesced -O3 -arch=sm_75 -std=c++17 -I/usr/local/cuda/include

optimized_bvh-tree:
$(NVCC) optimized_bvh-tree.cu -o optimized_bvh-tree -O3 -arch=sm_75 -std=c++17 -I/usr/local/cuda/include

optimized_bvh-texture:
$(NVCC) optimized_bvh-texture.cu -o optimized_bvh-texture -O3 -arch=sm_75 -std=c++17 -I/usr/local/cuda/include

cpu:
g++ cpu_launcher.cpp -o cpu -O3 -fopenmp -std=c++17

clean:
rm -f raytracer
rm -f *.out realtime global optimized array_bvh optimized_vertices-in-shared optimized_non-coalesced optimized_bvh-tree optimized_bvh-texture
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
Run `make` in the repo directory which will generate an executable `./raytracer`. Run that executable to generate an image.

The code has only been tested on a Polytechnique machine (Ubuntu) with CUDA pre-installed.

![Spheres with circulating light source](gif/spheres.gif)
![Playing with cat](gif/cat.gif)
Loading
Loading