Test creating multiple identical simple (non-closure) kernels.
(test, device)
| 323 | |
| 324 | |
| 325 | def 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 | # ======================================================================= |