-
Notifications
You must be signed in to change notification settings - Fork 55
CUDA: add array manipulation tests (indexing, slicing, reshape)\n\nAd… #731
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
base: main
Are you sure you want to change the base?
CUDA: add array manipulation tests (indexing, slicing, reshape)\n\nAd… #731
Conversation
…ds kernel-based tests for device-side 1D indexing, 1D slicing, and simple reshape (contiguous, view-compatible) for arrays. Skips under cudasim. NumPy is used as the reference. Scope is intentionally limited to safe, well-defined CUDA operations.
…complex64, uint8 dtypes\n- Add zero-length slice edge case\n- Add comments explaining kernel logic and test rationale\n- Use larger arrays for more robust validation\n\nAddresses review feedback for broader coverage and maintainability.
Greptile SummaryThis PR adds comprehensive kernel-based tests for device-side array manipulation operations (1D indexing, 1D slicing, and simple reshape). The tests validate CUDA array operations against NumPy as ground truth, covering multiple dtypes (
Confidence Score: 5/5
Important Files Changed
|
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.
1 file reviewed, 1 comment
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
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.
1 file reviewed, 1 comment
…hy explicit bounds check is not needed in slice_kernel (test parameters guarantee safety)
This PR adds kernel-based tests for device-side array manipulation operations:
1D indexing
1D slicing
Simple reshape (contiguous, view-compatible)
Tests are skipped under cudasim due to divergent semantics, and NumPy is used as the ground truth. Scope is intentionally limited to safe, well-defined CUDA operations (no fancy indexing, negative strides, or broadcasting).
#515