Spaces:
Paused
Paused
Download NvidiaWarp-GarmentCode/warp/tests/aux_test_square.py from qbhf2/GarmentCode: direct link, hf CLI and curl.
- Browser
- Download file 245 Bytes
-
https://huggingface.co/spaces/qbhf2/GarmentCode/resolve/main/NvidiaWarp-GarmentCode/warp/tests/aux_test_square.py
- Command line
-
hf download hf://spaces/qbhf2/GarmentCode/NvidiaWarp-GarmentCode/warp/tests/aux_test_square.py
-
curl -L -o aux_test_square.py https://huggingface.co/spaces/qbhf2/GarmentCode/resolve/main/NvidiaWarp-GarmentCode/warp/tests/aux_test_square.py
245 Bytes
| import warp as wp | |
| wp.init() | |
| def multiply(x: float): | |
| return x * x | |
| def kern(expect: float): | |
| wp.expect_eq(multiply(4.0), expect) | |
| def run(expect, device): | |
| wp.launch(kern, dim=1, inputs=[expect], device=device) | |