Skip to content

111 batch running features gpu runner#142

Merged
jmaack24 merged 62 commits into
developfrom
111-batch-running-features---gpu-runner
May 27, 2026
Merged

111 batch running features gpu runner#142
jmaack24 merged 62 commits into
developfrom
111-batch-running-features---gpu-runner

Conversation

@jmaack24
Copy link
Copy Markdown
Collaborator

@jmaack24 jmaack24 commented May 15, 2026

Implement/do the following for the OptixRunner:

  • Improve performance of SolTraceSystem::get_buffer_results
  • Add user specified batch size controlling number of rays traced per optixLaunch
  • Add logic to estimate batch size to fit on available device memory
  • Checks for GPU memory limit (i.e. Check available device memory, calculate required buffer size, batch accordingly)
  • Checks for rays that go past max depth (may just want to warn user)
  • Add user input for max depth

jmaack24 added 30 commits March 27, 2026 16:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 38 out of 38 changed files in this pull request and generated 4 comments.

Comment thread coretrace/simulation_runner/optix_runner/OptixCSP/src/core/soltrace_system.cpp Outdated
Comment thread coretrace/simulation_runner/embree_runner/ftz_daz.hpp
Comment thread coretrace/simulation_runner/simulation_runner.hpp
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 43 out of 43 changed files in this pull request and generated 7 comments.

Comment thread coretrace/simulation_runner/optix_runner/OptixCSP/src/core/soltrace_system.h Outdated
Comment thread coretrace/simulation_runner/embree_runner/trace_embree.cpp
Comment thread google-tests/unit-tests/simulation_runner/optix_runner/sun_test.cpp
@jmaack24 jmaack24 requested a review from taylorbrown75 May 27, 2026 14:59
@jmaack24
Copy link
Copy Markdown
Collaborator Author

To avoid duplicating work, I pulled in changes made on #142. Some of these features (generally, intersection functions for new geometries), are incomplete. These will be completed by #142.

Copy link
Copy Markdown
Collaborator

@taylorbrown75 taylorbrown75 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests pass on my windows machine. Only concern is whether we mark rays as EXIT on the gpu runner.

if (ht < HIT_CREATE || ht > HIT_EXIT)
break;
++raw_count;
if (ht == HIT_ABSORB || ht == HIT_EXIT)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is HIT_EXIT ever assigned in the GPU runner? The miss function in materials.cu does not set that value currently. There could be cases where rays exit the scene on the last available depth slot, but because it is not absorbed or marked as exit, it will be added to passed max depth counter.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

atomicAdd(reinterpret_cast<unsigned long long*>(params.d_depth_exceeded_count), 1ULL);

The atomic counter for the max depth exceeded is incremented in the materials.cu (above). If I understand the flow correctly, it should only get there if there is an intersection with an element. In which case that is not registered because it exceeds max depth. So only non HIT_EXIT rays should get counted.

Currently, we do not assign HIT_EXIT in the optix runner.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me, thank you for the clarification!

@jmaack24 jmaack24 marked this pull request as ready for review May 27, 2026 19:14
@jmaack24 jmaack24 merged commit d5a679d into develop May 27, 2026
11 checks passed
@jmaack24 jmaack24 deleted the 111-batch-running-features---gpu-runner branch May 28, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Batch running features - GPU Runner

4 participants