Skip to content

Conversation

@cliffburdick
Copy link
Collaborator

  • Add comprehensive unit tests for CUDA executor profiling functionality

    • Test basic timer operations (start/stop/get_time_ms)
    • Test behavior when profiling is disabled
    • Test multiple timer cycles
    • Test with complex operations and multiple streams
    • Test profiling overhead
    • Test with default stream
  • Fix safety issue in start_timer() and stop_timer()

    • Add profiling_ checks to prevent crashes when profiling is disabled
    • Functions are now no-ops when profiling is not enabled
    • Makes API more robust and user-friendly
  • Update CMakeLists.txt to include new ProfilingTests.cu

The profiling API now gracefully handles all states and provides better safety guarantees. Users can call timer functions without worrying about the profiling state, and only get_time_ms() will throw an exception when profiling is disabled (as intended).

Fixes: Segmentation fault when calling timer functions with profiling disabled
Tests: Added 8 new test cases covering all profiling functionality

- Add comprehensive unit tests for CUDA executor profiling functionality
  - Test basic timer operations (start/stop/get_time_ms)
  - Test behavior when profiling is disabled
  - Test multiple timer cycles
  - Test with complex operations and multiple streams
  - Test profiling overhead
  - Test with default stream

- Fix safety issue in start_timer() and stop_timer()
  - Add profiling_ checks to prevent crashes when profiling is disabled
  - Functions are now no-ops when profiling is not enabled
  - Makes API more robust and user-friendly

- Update CMakeLists.txt to include new ProfilingTests.cu

The profiling API now gracefully handles all states and provides
better safety guarantees. Users can call timer functions without
worrying about the profiling state, and only get_time_ms() will
throw an exception when profiling is disabled (as intended).

Fixes: Segmentation fault when calling timer functions with profiling disabled
Tests: Added 8 new test cases covering all profiling functionality
@copy-pr-bot
Copy link

copy-pr-bot bot commented Sep 26, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@cliffburdick
Copy link
Collaborator Author

/build

@cliffburdick cliffburdick merged commit 5253a8d into main Sep 29, 2025
1 check passed
@cliffburdick cliffburdick deleted the profiling_coverage branch September 29, 2025 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants