CUDA: add basic complex number operation tests\n\nAdds kernel-based t…#730
CUDA: add basic complex number operation tests\n\nAdds kernel-based t…#730CodersAcademy006 wants to merge 12 commits intoNVIDIA:mainfrom
Conversation
…ests for device-side complex64 addition, multiplication, and absolute value. Skips under cudasim. NumPy is used as the reference. Scope is intentionally limited to safe, well-defined CUDA operations.
Greptile SummaryAdds three kernel-based tests for device-side Key changes:
The implementation is clean, follows existing test patterns in the codebase, and addresses issue #515 by expanding CUDA test coverage for complex number operations. Confidence Score: 5/5
Important Files Changed
|
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
….py\n\n- Merged device-side complex64 operation tests (add, multiply, abs) into cudapy/test_complex.py as TestCudaComplexBasicOps for organizational consistency\n- Removed standalone test_complex.py file
There was a problem hiding this comment.
Additional Comments (1)
-
numba_cuda/numba/cuda/tests/cudapy/test_complex.py, line 62-66 (link)syntax: duplicate
numpyimport - already imported on line 2 asnp
1 file reviewed, 2 comments
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
… duplicate numpy import and comment marker\n\n- Ensures no NameError at import time and code style is clean
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Additional Comments (1)
-
numba_cuda/numba/cuda/tests/cudapy/test_complex.py, line 102-141 (link)style: duplicate imports - these imports are redundant since they're already present in lines 5-44 (after fixing the decorator on line 4)
1 file reviewed, 4 comments
…nd all imports come first\n- Removed duplicate imports\n- Kernels and TestCudaComplexBasicOps class now at end of file\n- Resolves NameError issues
This PR adds kernel-based tests for device-side complex64 operations: addition, multiplication, and absolute value.
Skips under cudasim due to divergent semantics
Uses NumPy as the reference oracle
Scope is intentionally limited to safe, well-defined CUDA operations (no division, power, or mixed-type ops)
This PR is intentionally narrow and reviewer-friendly, following the same discipline as previous CUDA test PRs.
#515