warp-lang 1.7.0__py3-none-win_amd64.whl → 1.7.2rc1__py3-none-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of warp-lang might be problematic. Click here for more details.

Files changed (60) hide show
  1. warp/autograd.py +12 -2
  2. warp/bin/warp-clang.dll +0 -0
  3. warp/bin/warp.dll +0 -0
  4. warp/build.py +1 -1
  5. warp/builtins.py +103 -66
  6. warp/codegen.py +48 -27
  7. warp/config.py +1 -1
  8. warp/context.py +112 -49
  9. warp/examples/benchmarks/benchmark_cloth.py +1 -1
  10. warp/examples/distributed/example_jacobi_mpi.py +507 -0
  11. warp/fem/cache.py +1 -1
  12. warp/fem/field/field.py +11 -1
  13. warp/fem/field/nodal_field.py +36 -22
  14. warp/fem/geometry/adaptive_nanogrid.py +7 -3
  15. warp/fem/geometry/trimesh.py +4 -12
  16. warp/jax_experimental/custom_call.py +14 -2
  17. warp/jax_experimental/ffi.py +100 -67
  18. warp/native/builtin.h +91 -65
  19. warp/native/svd.h +59 -49
  20. warp/native/tile.h +55 -26
  21. warp/native/volume.cpp +2 -2
  22. warp/native/volume_builder.cu +33 -22
  23. warp/native/warp.cu +1 -1
  24. warp/render/render_opengl.py +41 -34
  25. warp/render/render_usd.py +96 -6
  26. warp/sim/collide.py +11 -9
  27. warp/sim/inertia.py +189 -156
  28. warp/sim/integrator_euler.py +3 -0
  29. warp/sim/integrator_xpbd.py +3 -0
  30. warp/sim/model.py +56 -31
  31. warp/sim/render.py +4 -0
  32. warp/sparse.py +1 -1
  33. warp/stubs.py +73 -25
  34. warp/tests/assets/torus.usda +1 -1
  35. warp/tests/cuda/test_streams.py +1 -1
  36. warp/tests/sim/test_collision.py +237 -206
  37. warp/tests/sim/test_inertia.py +161 -0
  38. warp/tests/sim/test_model.py +5 -3
  39. warp/tests/sim/{flaky_test_sim_grad.py → test_sim_grad.py} +1 -4
  40. warp/tests/sim/test_xpbd.py +399 -0
  41. warp/tests/test_array.py +8 -7
  42. warp/tests/test_atomic.py +181 -2
  43. warp/tests/test_builtins_resolution.py +38 -38
  44. warp/tests/test_codegen.py +24 -3
  45. warp/tests/test_examples.py +16 -6
  46. warp/tests/test_fem.py +93 -14
  47. warp/tests/test_func.py +1 -1
  48. warp/tests/test_mat.py +416 -119
  49. warp/tests/test_quat.py +321 -137
  50. warp/tests/test_struct.py +116 -0
  51. warp/tests/test_vec.py +320 -174
  52. warp/tests/tile/test_tile.py +27 -0
  53. warp/tests/tile/test_tile_load.py +124 -0
  54. warp/tests/unittest_suites.py +2 -5
  55. warp/types.py +107 -9
  56. {warp_lang-1.7.0.dist-info → warp_lang-1.7.2rc1.dist-info}/METADATA +41 -19
  57. {warp_lang-1.7.0.dist-info → warp_lang-1.7.2rc1.dist-info}/RECORD +60 -57
  58. {warp_lang-1.7.0.dist-info → warp_lang-1.7.2rc1.dist-info}/WHEEL +1 -1
  59. {warp_lang-1.7.0.dist-info → warp_lang-1.7.2rc1.dist-info}/licenses/LICENSE.md +0 -26
  60. {warp_lang-1.7.0.dist-info → warp_lang-1.7.2rc1.dist-info}/top_level.txt +0 -0
warp/stubs.py CHANGED
@@ -713,7 +713,7 @@ def quaternion(dtype: Float) -> Quaternion[Float]:
713
713
 
714
714
 
715
715
  @over
716
- def quaternion(x: Float, y: Float, z: Float, w: Float) -> Quaternion[Float]:
716
+ def quaternion(x: Float, y: Float, z: Float, w: Float, dtype: Scalar) -> Quaternion[Float]:
717
717
  """Create a quaternion using the supplied components (type inferred from component type)."""
718
718
  ...
719
719
 
@@ -2248,145 +2248,193 @@ def where(arr: Array[Any], value_if_true: Any, value_if_false: Any) -> Any:
2248
2248
 
2249
2249
  @over
2250
2250
  def atomic_add(arr: Array[Any], i: Int, value: Any) -> Any:
2251
- """Atomically add ``value`` onto ``arr[i]`` and return the old value."""
2251
+ """Atomically adds ``value`` onto ``arr[i]`` and returns the original value of ``arr[i]``.
2252
+ This function is automatically invoked when using the syntax ``arr[i] += value``.
2253
+ """
2252
2254
  ...
2253
2255
 
2254
2256
 
2255
2257
  @over
2256
2258
  def atomic_add(arr: Array[Any], i: Int, j: Int, value: Any) -> Any:
2257
- """Atomically add ``value`` onto ``arr[i,j]`` and return the old value."""
2259
+ """Atomically adds ``value`` onto ``arr[i,j]`` and returns the original value of ``arr[i,j]``.
2260
+ This function is automatically invoked when using the syntax ``arr[i,j] += value``.
2261
+ """
2258
2262
  ...
2259
2263
 
2260
2264
 
2261
2265
  @over
2262
2266
  def atomic_add(arr: Array[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
2263
- """Atomically add ``value`` onto ``arr[i,j,k]`` and return the old value."""
2267
+ """Atomically adds ``value`` onto ``arr[i,j,k]`` and returns the original value of ``arr[i,j,k]``.
2268
+ This function is automatically invoked when using the syntax ``arr[i,j,k] += value``.
2269
+ """
2264
2270
  ...
2265
2271
 
2266
2272
 
2267
2273
  @over
2268
2274
  def atomic_add(arr: Array[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
2269
- """Atomically add ``value`` onto ``arr[i,j,k,l]`` and return the old value."""
2275
+ """Atomically adds ``value`` onto ``arr[i,j,k,l]`` and returns the original value of ``arr[i,j,k,l]``.
2276
+ This function is automatically invoked when using the syntax ``arr[i,j,k,l] += value``.
2277
+ """
2270
2278
  ...
2271
2279
 
2272
2280
 
2273
2281
  @over
2274
2282
  def atomic_add(arr: FabricArray[Any], i: Int, value: Any) -> Any:
2275
- """Atomically add ``value`` onto ``arr[i]`` and return the old value."""
2283
+ """Atomically adds ``value`` onto ``arr[i]`` and returns the original value of ``arr[i]``.
2284
+ This function is automatically invoked when using the syntax ``arr[i] += value``.
2285
+ """
2276
2286
  ...
2277
2287
 
2278
2288
 
2279
2289
  @over
2280
2290
  def atomic_add(arr: FabricArray[Any], i: Int, j: Int, value: Any) -> Any:
2281
- """Atomically add ``value`` onto ``arr[i,j]`` and return the old value."""
2291
+ """Atomically adds ``value`` onto ``arr[i,j]`` and returns the original value of ``arr[i,j]``.
2292
+ This function is automatically invoked when using the syntax ``arr[i,j] += value``.
2293
+ """
2282
2294
  ...
2283
2295
 
2284
2296
 
2285
2297
  @over
2286
2298
  def atomic_add(arr: FabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
2287
- """Atomically add ``value`` onto ``arr[i,j,k]`` and return the old value."""
2299
+ """Atomically adds ``value`` onto ``arr[i,j,k]`` and returns the original value of ``arr[i,j,k]``.
2300
+ This function is automatically invoked when using the syntax ``arr[i,j,k] += value``.
2301
+ """
2288
2302
  ...
2289
2303
 
2290
2304
 
2291
2305
  @over
2292
2306
  def atomic_add(arr: FabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
2293
- """Atomically add ``value`` onto ``arr[i,j,k,l]`` and return the old value."""
2307
+ """Atomically adds ``value`` onto ``arr[i,j,k,l]`` and returns the original value of ``arr[i,j,k,l]``.
2308
+ This function is automatically invoked when using the syntax ``arr[i,j,k,l] += value``.
2309
+ """
2294
2310
  ...
2295
2311
 
2296
2312
 
2297
2313
  @over
2298
2314
  def atomic_add(arr: IndexedFabricArray[Any], i: Int, value: Any) -> Any:
2299
- """Atomically add ``value`` onto ``arr[i]`` and return the old value."""
2315
+ """Atomically adds ``value`` onto ``arr[i]`` and returns the original value of ``arr[i]``.
2316
+ This function is automatically invoked when using the syntax ``arr[i] += value``.
2317
+ """
2300
2318
  ...
2301
2319
 
2302
2320
 
2303
2321
  @over
2304
2322
  def atomic_add(arr: IndexedFabricArray[Any], i: Int, j: Int, value: Any) -> Any:
2305
- """Atomically add ``value`` onto ``arr[i,j]`` and return the old value."""
2323
+ """Atomically adds ``value`` onto ``arr[i,j]`` and returns the original value of ``arr[i,j]``.
2324
+ This function is automatically invoked when using the syntax ``arr[i,j] += value``.
2325
+ """
2306
2326
  ...
2307
2327
 
2308
2328
 
2309
2329
  @over
2310
2330
  def atomic_add(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
2311
- """Atomically add ``value`` onto ``arr[i,j,k]`` and return the old value."""
2331
+ """Atomically adds ``value`` onto ``arr[i,j,k]`` and returns the original value of ``arr[i,j,k]``.
2332
+ This function is automatically invoked when using the syntax ``arr[i,j,k] += value``.
2333
+ """
2312
2334
  ...
2313
2335
 
2314
2336
 
2315
2337
  @over
2316
2338
  def atomic_add(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
2317
- """Atomically add ``value`` onto ``arr[i,j,k,l]`` and return the old value."""
2339
+ """Atomically adds ``value`` onto ``arr[i,j,k,l]`` and returns the original value of ``arr[i,j,k,l]``.
2340
+ This function is automatically invoked when using the syntax ``arr[i,j,k,l] += value``.
2341
+ """
2318
2342
  ...
2319
2343
 
2320
2344
 
2321
2345
  @over
2322
2346
  def atomic_sub(arr: Array[Any], i: Int, value: Any) -> Any:
2323
- """Atomically subtract ``value`` onto ``arr[i]`` and return the old value."""
2347
+ """Atomically subtracts ``value`` onto ``arr[i]`` and returns the original value of ``arr[i]``.
2348
+ This function is automatically invoked when using the syntax ``arr[i] -= value``.
2349
+ """
2324
2350
  ...
2325
2351
 
2326
2352
 
2327
2353
  @over
2328
2354
  def atomic_sub(arr: Array[Any], i: Int, j: Int, value: Any) -> Any:
2329
- """Atomically subtract ``value`` onto ``arr[i,j]`` and return the old value."""
2355
+ """Atomically subtracts ``value`` onto ``arr[i,j]`` and returns the original value of ``arr[i,j]``.
2356
+ This function is automatically invoked when using the syntax ``arr[i,j] -= value``.
2357
+ """
2330
2358
  ...
2331
2359
 
2332
2360
 
2333
2361
  @over
2334
2362
  def atomic_sub(arr: Array[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
2335
- """Atomically subtract ``value`` onto ``arr[i,j,k]`` and return the old value."""
2363
+ """Atomically subtracts ``value`` onto ``arr[i,j,k]`` and returns the original value of ``arr[i,j,k]``.
2364
+ This function is automatically invoked when using the syntax ``arr[i,j,k] -= value``.
2365
+ """
2336
2366
  ...
2337
2367
 
2338
2368
 
2339
2369
  @over
2340
2370
  def atomic_sub(arr: Array[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
2341
- """Atomically subtract ``value`` onto ``arr[i,j,k,l]`` and return the old value."""
2371
+ """Atomically subtracts ``value`` onto ``arr[i,j,k,l]`` and returns the original value of ``arr[i,j,k,l]``.
2372
+ This function is automatically invoked when using the syntax ``arr[i,j,k,l] -= value``.
2373
+ """
2342
2374
  ...
2343
2375
 
2344
2376
 
2345
2377
  @over
2346
2378
  def atomic_sub(arr: FabricArray[Any], i: Int, value: Any) -> Any:
2347
- """Atomically subtract ``value`` onto ``arr[i]`` and return the old value."""
2379
+ """Atomically subtracts ``value`` onto ``arr[i]`` and returns the original value of ``arr[i]``.
2380
+ This function is automatically invoked when using the syntax ``arr[i] -= value``.
2381
+ """
2348
2382
  ...
2349
2383
 
2350
2384
 
2351
2385
  @over
2352
2386
  def atomic_sub(arr: FabricArray[Any], i: Int, j: Int, value: Any) -> Any:
2353
- """Atomically subtract ``value`` onto ``arr[i,j]`` and return the old value."""
2387
+ """Atomically subtracts ``value`` onto ``arr[i,j]`` and returns the original value of ``arr[i,j]``.
2388
+ This function is automatically invoked when using the syntax ``arr[i,j] -= value``.
2389
+ """
2354
2390
  ...
2355
2391
 
2356
2392
 
2357
2393
  @over
2358
2394
  def atomic_sub(arr: FabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
2359
- """Atomically subtract ``value`` onto ``arr[i,j,k]`` and return the old value."""
2395
+ """Atomically subtracts ``value`` onto ``arr[i,j,k]`` and returns the original value of ``arr[i,j,k]``.
2396
+ This function is automatically invoked when using the syntax ``arr[i,j,k] -= value``.
2397
+ """
2360
2398
  ...
2361
2399
 
2362
2400
 
2363
2401
  @over
2364
2402
  def atomic_sub(arr: FabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
2365
- """Atomically subtract ``value`` onto ``arr[i,j,k,l]`` and return the old value."""
2403
+ """Atomically subtracts ``value`` onto ``arr[i,j,k,l]`` and returns the original value of ``arr[i,j,k,l]``.
2404
+ This function is automatically invoked when using the syntax ``arr[i,j,k,l] -= value``.
2405
+ """
2366
2406
  ...
2367
2407
 
2368
2408
 
2369
2409
  @over
2370
2410
  def atomic_sub(arr: IndexedFabricArray[Any], i: Int, value: Any) -> Any:
2371
- """Atomically subtract ``value`` onto ``arr[i]`` and return the old value."""
2411
+ """Atomically subtracts ``value`` onto ``arr[i]`` and returns the original value of ``arr[i]``.
2412
+ This function is automatically invoked when using the syntax ``arr[i] -= value``.
2413
+ """
2372
2414
  ...
2373
2415
 
2374
2416
 
2375
2417
  @over
2376
2418
  def atomic_sub(arr: IndexedFabricArray[Any], i: Int, j: Int, value: Any) -> Any:
2377
- """Atomically subtract ``value`` onto ``arr[i,j]`` and return the old value."""
2419
+ """Atomically subtracts ``value`` onto ``arr[i,j]`` and returns the original value of ``arr[i,j]``.
2420
+ This function is automatically invoked when using the syntax ``arr[i,j] -= value``.
2421
+ """
2378
2422
  ...
2379
2423
 
2380
2424
 
2381
2425
  @over
2382
2426
  def atomic_sub(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, value: Any) -> Any:
2383
- """Atomically subtract ``value`` onto ``arr[i,j,k]`` and return the old value."""
2427
+ """Atomically subtracts ``value`` onto ``arr[i,j,k]`` and returns the original value of ``arr[i,j,k]``.
2428
+ This function is automatically invoked when using the syntax ``arr[i,j,k] -= value``.
2429
+ """
2384
2430
  ...
2385
2431
 
2386
2432
 
2387
2433
  @over
2388
2434
  def atomic_sub(arr: IndexedFabricArray[Any], i: Int, j: Int, k: Int, l: Int, value: Any) -> Any:
2389
- """Atomically subtract ``value`` onto ``arr[i,j,k,l]`` and return the old value."""
2435
+ """Atomically subtracts ``value`` onto ``arr[i,j,k,l]`` and returns the original value of ``arr[i,j,k,l]``.
2436
+ This function is automatically invoked when using the syntax ``arr[i,j,k,l] -= value``.
2437
+ """
2390
2438
  ...
2391
2439
 
2392
2440
 
@@ -59,9 +59,9 @@
59
59
  }
60
60
  defaultPrim = "World"
61
61
  endTimeCode = 100
62
+ framesPerSecond = 24
62
63
  metersPerUnit = 0.01
63
64
  startTimeCode = 0
64
- timeCodesPerSecond = 24
65
65
  upAxis = "Y"
66
66
  )
67
67
 
@@ -442,7 +442,7 @@ def test_stream_event_is_complete(test, device):
442
442
 
443
443
  a = wp.zeros(1, dtype=wp.uint64)
444
444
 
445
- threads = 1024 * 1024 * 8
445
+ threads = 1024 * 1024 * 64
446
446
 
447
447
  with wp.ScopedStream(stream):
448
448
  # Launch some work on the stream and reuse the event