• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

shader-slang / slang-rhi / 22099170781

17 Feb 2026 12:51PM UTC coverage: 57.779% (-0.04%) from 57.816%
22099170781

push

github

web-flow
Reduce CUDA context push/pop overhead (#642)

* Set CUDA context at SlangPy entry points for reduced overhead

  - Add set_cuda_context_current() wrapper in Device class
  - Call setCudaContextCurrent() in NativeCallData::exec() before kernel
  execution
  - Add Python binding for manual context control
  - Update tests to set CUDA context before test execution

  Works with slang-rhi CUDA context optimization to eliminate per-call
  push/pop overhead by setting context once at entry points.

* Simplify the ContextScope push/pop

* Address review feedback: restore push/pop in present()/configure(), keep cuCtxGetCurrent optimization

9502 of 19070 branches covered (49.83%)

Branch coverage included in aggregate %.

9 of 28 new or added lines in 3 files covered. (32.14%)

13 existing lines in 4 files now uncovered.

27807 of 45502 relevant lines covered (61.11%)

255651.8 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

73.72
/src/cuda/cuda-buffer.cpp


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc