MCPcopy Index your code
hub / github.com/NVIDIA/warp / test_create_kernel_simple

Function test_create_kernel_simple

warp/tests/test_codegen_instancing.py:325–334  ·  view source on GitHub ↗

Test creating multiple identical simple (non-closure) kernels.

(test, device)

Source from the content-addressed store, hash-verified

323
324
325def test_create_kernel_simple(test, device):
326 """Test creating multiple identical simple (non-closure) kernels."""
327 with wp.ScopedDevice(device):
328 a = wp.zeros(1, dtype=int)
329
330 wp.launch(simple_kernel_1, dim=1, inputs=[a])
331 test.assertEqual(a.numpy()[0], 17)
332
333 wp.launch(simple_kernel_2, dim=1, inputs=[a])
334 test.assertEqual(a.numpy()[0], 17)
335
336
337# =======================================================================

Callers

nothing calls this directly

Calls 2

launchMethod · 0.80
numpyMethod · 0.45

Tested by

no test coverage detected