-
Notifications
You must be signed in to change notification settings - Fork 1
multi launcher with detached streamed kernel + formatting #25
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
Conversation
WalkthroughThis pull request makes several minor, non‐functional adjustments. The Changes
Sequence Diagram(s)sequenceDiagram
participant Main as Main
participant Test as test_threaded_detached_stream_fns
participant Launcher as ThreadedStreamLauncher
participant Host as Host Function
participant Device as Device Function
Main->>Test: Call test_threaded_detached_stream_fns()
Test->>Launcher: Initialize stream launcher
Launcher->>Host: Execute host synchronization and increment
Launcher->>Device: Execute device increment
Host-->>Launcher: Host completed
Device-->>Launcher: Device completed
Launcher-->>Test: Return test results
Test->>Main: Pass overall status
Poem
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
test/any/async_streaming.cpp (1)
197-231: Consider using epsilon comparison for floating-point values.When comparing floating-point values (double) in the validation loop, using direct equality comparison might lead to precision issues. Consider using an epsilon-based comparison.
- if (val != vecs[i][j]) return 1; + if (std::abs(val - vecs[i][j]) > std::numeric_limits<T>::epsilon()) return 1;Also, add a test for error conditions:
// Add at the beginning of the function if (nthreads == 0) return 1;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (13)
.clang-format(1 hunks)inc/mkn/gpu/cuda.hpp(1 hunks)inc/mkn/gpu/launchers.hpp(2 hunks)inc/mkn/gpu/rocm.hpp(1 hunks)inc/mkn/gpu/tuple.hpp(1 hunks)test/any/array.cpp(1 hunks)test/any/async_streaming.cpp(3 hunks)test/cpu/namespace.cpp(1 hunks)test/cuda/add.cpp(1 hunks)test/cuda/async.cpp(3 hunks)test/cuda/atomic.cpp(1 hunks)test/hip/add.cpp(1 hunks)test/hip/async.cpp(3 hunks)
✅ Files skipped from review due to trivial changes (9)
- inc/mkn/gpu/cuda.hpp
- test/hip/add.cpp
- test/cpu/namespace.cpp
- test/cuda/atomic.cpp
- test/cuda/add.cpp
- test/any/array.cpp
- inc/mkn/gpu/rocm.hpp
- test/cuda/async.cpp
- test/hip/async.cpp
🔇 Additional comments (5)
.clang-format (1)
1-8: LGTM! Well-defined formatting rules.The formatting configuration provides clear, consistent rules that align with modern C++ practices. The combination of right-aligned qualifiers and left-aligned pointers will help maintain a uniform style across the codebase.
inc/mkn/gpu/launchers.hpp (1)
51-51: LGTM! Improved const-correctness.The addition of const qualifiers to constructor parameters enhances type safety without affecting functionality.
Also applies to: 72-72
inc/mkn/gpu/tuple.hpp (1)
124-124: LGTM! Consistent const qualifier placement.The change aligns with the new formatting rules by moving the const qualifier to the right of the type.
test/any/async_streaming.cpp (2)
183-183: LGTM! Improved increment operator placement.The prefix increment operator (++i) is preferred over postfix (i++) for better performance with iterators.
240-240: LGTM! Test coverage expanded.The addition of test_threaded_detached_stream_fns improves test coverage for detached stream functionality.
Summary by CodeRabbit
This release delivers several foundational improvements that enhance code consistency and robustness without changing overall functionality. Key updates include standardized formatting, refined parameter declarations, and expanded test coverage.