Spaces:
Sleeping
Sleeping
File size: 245 Bytes
66c9c8a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import warp as wp
wp.init()
@wp.func
def multiply(x: float):
return x * x
@wp.kernel
def kern(expect: float):
wp.expect_eq(multiply(4.0), expect)
def run(expect, device):
wp.launch(kern, dim=1, inputs=[expect], device=device)
|