Skip to content

Add CuTeDSL math tests for sqrt operation - #3430

Open
Pritiks23 wants to merge 1 commit into
NVIDIA:mainfrom
Pritiks23:update-cute-math-tests
Open

Add CuTeDSL math tests for sqrt operation#3430
Pritiks23 wants to merge 1 commit into
NVIDIA:mainfrom
Pritiks23:update-cute-math-tests

Conversation

@Pritiks23

Copy link
Copy Markdown

Add sqrt unary math operation test

Description

Add coverage for cute.math.sqrt by introducing a new unary operation test.

This change:

  • Adds a _sqrt_ops_kernel that applies cute.math.sqrt elementwise.
  • Adds a _sqrt_ops_host JIT wrapper to launch the kernel.
  • Adds test_sqrt_ops to verify correctness against expected square root values using CUDA tensors.

The test ensures that cute.math.sqrt correctly lowers and executes through CuTe's math operation interface.

Testing

  • Added a CUDA unit test covering float32 sqrt operations.
  • Verified output correctness against expected values:
    • sqrt(1.0) = 1.0
    • sqrt(4.0) = 2.0
    • sqrt(9.0) = 3.0
    • sqrt(16.0) = 4.0

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.

1 participant