warp-lang 1.2.1__py3-none-manylinux2014_x86_64.whl → 1.2.2__py3-none-manylinux2014_x86_64.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.

warp/config.py CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  from typing import Optional
9
9
 
10
- version: str = "1.2.1"
10
+ version: str = "1.2.2"
11
11
 
12
12
  verify_fp: bool = False # verify inputs and outputs are finite after each launch
13
13
  verify_cuda: bool = False # if true will check CUDA errors after each kernel launch / memory operation
warp/context.py CHANGED
@@ -4045,7 +4045,7 @@ def full(
4045
4045
  # a sequence, assume it's a vector or matrix value
4046
4046
  try:
4047
4047
  # try to convert to a numpy array first
4048
- na = np.array(value, copy=False)
4048
+ na = np.asarray(value)
4049
4049
  except Exception as e:
4050
4050
  raise ValueError(f"Failed to interpret the value as a vector or matrix: {e}") from e
4051
4051
 
@@ -687,10 +687,22 @@ def test_equality(test, device, dtype, register_kernels=False):
687
687
  vec4 = wp.types.vector(length=4, dtype=wptype)
688
688
  vec5 = wp.types.vector(length=5, dtype=wptype)
689
689
 
690
- def check_equality(
690
+ def check_unsigned_equality(
691
691
  v20: wp.array(dtype=vec2),
692
692
  v21: wp.array(dtype=vec2),
693
693
  v22: wp.array(dtype=vec2),
694
+ v30: wp.array(dtype=vec3),
695
+ v40: wp.array(dtype=vec4),
696
+ v50: wp.array(dtype=vec5),
697
+ ):
698
+ wp.expect_eq(v20[0], v20[0])
699
+ wp.expect_neq(v21[0], v20[0])
700
+ wp.expect_neq(v22[0], v20[0])
701
+ wp.expect_eq(v30[0], v30[0])
702
+ wp.expect_eq(v40[0], v40[0])
703
+ wp.expect_eq(v50[0], v50[0])
704
+
705
+ def check_signed_equality(
694
706
  v30: wp.array(dtype=vec3),
695
707
  v31: wp.array(dtype=vec3),
696
708
  v32: wp.array(dtype=vec3),
@@ -707,29 +719,21 @@ def test_equality(test, device, dtype, register_kernels=False):
707
719
  v54: wp.array(dtype=vec5),
708
720
  v55: wp.array(dtype=vec5),
709
721
  ):
710
- wp.expect_eq(v20[0], v20[0])
711
- wp.expect_neq(v21[0], v20[0])
712
- wp.expect_neq(v22[0], v20[0])
713
-
714
- wp.expect_eq(v30[0], v30[0])
715
722
  wp.expect_neq(v31[0], v30[0])
716
723
  wp.expect_neq(v32[0], v30[0])
717
724
  wp.expect_neq(v33[0], v30[0])
718
-
719
- wp.expect_eq(v40[0], v40[0])
720
725
  wp.expect_neq(v41[0], v40[0])
721
726
  wp.expect_neq(v42[0], v40[0])
722
727
  wp.expect_neq(v43[0], v40[0])
723
728
  wp.expect_neq(v44[0], v40[0])
724
-
725
- wp.expect_eq(v50[0], v50[0])
726
729
  wp.expect_neq(v51[0], v50[0])
727
730
  wp.expect_neq(v52[0], v50[0])
728
731
  wp.expect_neq(v53[0], v50[0])
729
732
  wp.expect_neq(v54[0], v50[0])
730
733
  wp.expect_neq(v55[0], v50[0])
731
734
 
732
- kernel = getkernel(check_equality, suffix=dtype.__name__)
735
+ unsigned_kernel = getkernel(check_unsigned_equality, suffix=dtype.__name__)
736
+ signed_kernel = getkernel(check_signed_equality, suffix=dtype.__name__)
733
737
 
734
738
  if register_kernels:
735
739
  return
@@ -739,49 +743,64 @@ def test_equality(test, device, dtype, register_kernels=False):
739
743
  v22 = wp.array([3.0, 2.0], dtype=vec2, requires_grad=True, device=device)
740
744
 
741
745
  v30 = wp.array([1.0, 2.0, 3.0], dtype=vec3, requires_grad=True, device=device)
742
- v31 = wp.array([-1.0, 2.0, 3.0], dtype=vec3, requires_grad=True, device=device)
743
- v32 = wp.array([1.0, -2.0, 3.0], dtype=vec3, requires_grad=True, device=device)
744
- v33 = wp.array([1.0, 2.0, -3.0], dtype=vec3, requires_grad=True, device=device)
745
-
746
746
  v40 = wp.array([1.0, 2.0, 3.0, 4.0], dtype=vec4, requires_grad=True, device=device)
747
- v41 = wp.array([-1.0, 2.0, 3.0, 4.0], dtype=vec4, requires_grad=True, device=device)
748
- v42 = wp.array([1.0, -2.0, 3.0, 4.0], dtype=vec4, requires_grad=True, device=device)
749
- v43 = wp.array([1.0, 2.0, -3.0, 4.0], dtype=vec4, requires_grad=True, device=device)
750
- v44 = wp.array([1.0, 2.0, 3.0, -4.0], dtype=vec4, requires_grad=True, device=device)
751
-
752
747
  v50 = wp.array([1.0, 2.0, 3.0, 4.0, 5.0], dtype=vec5, requires_grad=True, device=device)
753
- v51 = wp.array([-1.0, 2.0, 3.0, 4.0, 5.0], dtype=vec5, requires_grad=True, device=device)
754
- v52 = wp.array([1.0, -2.0, 3.0, 4.0, 5.0], dtype=vec5, requires_grad=True, device=device)
755
- v53 = wp.array([1.0, 2.0, -3.0, 4.0, 5.0], dtype=vec5, requires_grad=True, device=device)
756
- v54 = wp.array([1.0, 2.0, 3.0, -4.0, 5.0], dtype=vec5, requires_grad=True, device=device)
757
- v55 = wp.array([1.0, 2.0, 3.0, 4.0, -5.0], dtype=vec5, requires_grad=True, device=device)
748
+
758
749
  wp.launch(
759
- kernel,
750
+ unsigned_kernel,
760
751
  dim=1,
761
752
  inputs=[
762
753
  v20,
763
754
  v21,
764
755
  v22,
765
756
  v30,
766
- v31,
767
- v32,
768
- v33,
769
757
  v40,
770
- v41,
771
- v42,
772
- v43,
773
- v44,
774
758
  v50,
775
- v51,
776
- v52,
777
- v53,
778
- v54,
779
- v55,
780
759
  ],
781
760
  outputs=[],
782
761
  device=device,
783
762
  )
784
763
 
764
+ if dtype not in np_unsigned_int_types:
765
+ v31 = wp.array([-1.0, 2.0, 3.0], dtype=vec3, requires_grad=True, device=device)
766
+ v32 = wp.array([1.0, -2.0, 3.0], dtype=vec3, requires_grad=True, device=device)
767
+ v33 = wp.array([1.0, 2.0, -3.0], dtype=vec3, requires_grad=True, device=device)
768
+
769
+ v41 = wp.array([-1.0, 2.0, 3.0, 4.0], dtype=vec4, requires_grad=True, device=device)
770
+ v42 = wp.array([1.0, -2.0, 3.0, 4.0], dtype=vec4, requires_grad=True, device=device)
771
+ v43 = wp.array([1.0, 2.0, -3.0, 4.0], dtype=vec4, requires_grad=True, device=device)
772
+ v44 = wp.array([1.0, 2.0, 3.0, -4.0], dtype=vec4, requires_grad=True, device=device)
773
+
774
+ v51 = wp.array([-1.0, 2.0, 3.0, 4.0, 5.0], dtype=vec5, requires_grad=True, device=device)
775
+ v52 = wp.array([1.0, -2.0, 3.0, 4.0, 5.0], dtype=vec5, requires_grad=True, device=device)
776
+ v53 = wp.array([1.0, 2.0, -3.0, 4.0, 5.0], dtype=vec5, requires_grad=True, device=device)
777
+ v54 = wp.array([1.0, 2.0, 3.0, -4.0, 5.0], dtype=vec5, requires_grad=True, device=device)
778
+ v55 = wp.array([1.0, 2.0, 3.0, 4.0, -5.0], dtype=vec5, requires_grad=True, device=device)
779
+
780
+ wp.launch(
781
+ signed_kernel,
782
+ dim=1,
783
+ inputs=[
784
+ v30,
785
+ v31,
786
+ v32,
787
+ v33,
788
+ v40,
789
+ v41,
790
+ v42,
791
+ v43,
792
+ v44,
793
+ v50,
794
+ v51,
795
+ v52,
796
+ v53,
797
+ v54,
798
+ v55,
799
+ ],
800
+ outputs=[],
801
+ device=device,
802
+ )
803
+
785
804
 
786
805
  def test_scalar_multiplication(test, device, dtype, register_kernels=False):
787
806
  rng = np.random.default_rng(123)
warp/types.py CHANGED
@@ -1685,7 +1685,7 @@ class array(Array):
1685
1685
  if dtype == Any:
1686
1686
  # infer dtype from data
1687
1687
  try:
1688
- arr = np.array(data, copy=False, ndmin=1)
1688
+ arr = np.asarray(data)
1689
1689
  except Exception as e:
1690
1690
  raise RuntimeError(f"Failed to convert input data to an array: {e}") from e
1691
1691
  dtype = np_dtype_to_warp_type.get(arr.dtype)
@@ -1724,7 +1724,7 @@ class array(Array):
1724
1724
  f"Failed to convert input data to an array with Warp type {warp.context.type_str(dtype)}"
1725
1725
  )
1726
1726
  try:
1727
- arr = np.array(data, dtype=npdtype, copy=False, ndmin=1)
1727
+ arr = np.asarray(data, dtype=npdtype)
1728
1728
  except Exception as e:
1729
1729
  raise RuntimeError(f"Failed to convert input data to an array with type {npdtype}: {e}") from e
1730
1730
 
@@ -2333,7 +2333,7 @@ class array(Array):
2333
2333
  a = self.to("cpu", requires_grad=False)
2334
2334
  # convert through __array_interface__
2335
2335
  # Note: this handles arrays of structs using `descr`, so the result will be a structured NumPy array
2336
- return np.array(a, copy=False)
2336
+ return np.asarray(a)
2337
2337
  else:
2338
2338
  # return an empty numpy array with the correct dtype and shape
2339
2339
  if isinstance(self.dtype, warp.codegen.Struct):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: warp-lang
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: A Python framework for high-performance simulation and graphics programming
5
5
  Author-email: NVIDIA <mmacklin@nvidia.com>
6
6
  License: NVIDIA Software License
@@ -4,9 +4,9 @@ warp/build.py,sha256=LmRSU00pdlN1P31XS1_FhXgu_k7GzKkAzPd0LacZClo,3690
4
4
  warp/build_dll.py,sha256=p9eTXMhKbI0uTkpqeY5DxOmVhupfaykM-a-re6fXBXg,15896
5
5
  warp/builtins.py,sha256=AlHPF8WTvTOF2DGo8nQJ_OmZ5nzkoTi_qPLDlc6fPg0,122322
6
6
  warp/codegen.py,sha256=MJC5a63p-eXelMivb0Tyg6hU_ZCuqx8nMDSE7Om0BV0,103205
7
- warp/config.py,sha256=uimmJvTOD_xfYuBo4rExTn4izyvbzXJqsURttRkqwXA,1879
7
+ warp/config.py,sha256=gRyon6yrUl16-XDLbTYV7PfuXBMWTLOiAnx129lWIzs,1879
8
8
  warp/constants.py,sha256=ckfEqwbg109RJDW98SILe_yfOBEFolOATVjt0mU2py4,1321
9
- warp/context.py,sha256=_vyVfFBpo-teFiy_n26F0If5GU5cVfU7wWksbkyYckM,213618
9
+ warp/context.py,sha256=QEGden9SZLlWFUhEwHJEXSNOLOMaFTxMA79DQzzOXaA,213608
10
10
  warp/dlpack.py,sha256=z242iSS70YF-5IP-GVE83R7HbHB5aRMmiYiQlAbyNis,16568
11
11
  warp/fabric.py,sha256=__Dbd9TmF5bqxUh411dpiAGxrlsfDAwZ8benjXN3Jco,11316
12
12
  warp/jax.py,sha256=QKJXfpz1jjaRD-Yp4C4wC4jUv8jHj0en3MW0VXKq0ZA,5280
@@ -15,7 +15,7 @@ warp/sparse.py,sha256=57Ar8OknSZ5P0apLLm_hnhxWlj0bh6U-mbu2qfYDcis,42356
15
15
  warp/stubs.py,sha256=wS3_3Joiutw9cecEzae5GyYHIOUH6wl8CdLeozueqks,57977
16
16
  warp/tape.py,sha256=hH3Qb9CiKHmq5OUIHRTZjZdYDXR2noHFNiB9HrIl5ZU,47864
17
17
  warp/torch.py,sha256=5hRCNL5jJzrh3hAcn1DdYfTvdOA5fvBy0VQnHviZpkE,11760
18
- warp/types.py,sha256=JViQDLNFdeaGyqklXWGMyHYrgGK1_6UKOBPbJSqkEZM,170284
18
+ warp/types.py,sha256=xKBWVRektFwU4r5FPL8ePR-ZR6_ue30wzVMfz2iHaK0,170236
19
19
  warp/utils.py,sha256=UoTCl9kGlPJBlsgvhM726VsnMkUsQSamxLQ0vgR1h5s,34148
20
20
  warp/bin/warp-clang.so,sha256=mKEvTDt6X2fkaD0XJUdTHcwUI-_18rtTls9z5nTYdKA,66199872
21
21
  warp/bin/warp.so,sha256=riEf32U_pt1CNMMOdnlYXlew7_olGsPxwB8XObD89sM,110600160
@@ -329,7 +329,7 @@ warp/tests/test_types.py,sha256=gQcQXTFK41QkfMKGP9fXd_WTtdlFNiPotAY6TpdvEsM,2211
329
329
  warp/tests/test_utils.py,sha256=_LixxYRl-7sj4YbcdSZNjaTrh72MRiadLr8iElvW0v4,18801
330
330
  warp/tests/test_vec.py,sha256=50B7gKFzMTNGmp0amBndlfLIF6yOk4GKMRPEu-mxmdg,42423
331
331
  warp/tests/test_vec_lite.py,sha256=zcTogrKDqYJsJXlAvR8zsSYiVsCB-mqphark6ULehcA,2343
332
- warp/tests/test_vec_scalar_ops.py,sha256=lRnkyH-MCeoCKpnp_x03mfx4BIjBrUvWkdNFva2Ot6o,84906
332
+ warp/tests/test_vec_scalar_ops.py,sha256=A7B5gDXpyEExHahORUkHaErO9NB5Zt6mHwxT1iStvTk,85526
333
333
  warp/tests/test_verify_fp.py,sha256=KQuFVhAfjQ8YQHWWHP6vj7SX8zatGRJmfMDTotc7JBQ,2343
334
334
  warp/tests/test_volume.py,sha256=QlvrJUpZ8Wq1PAd5a0o-YqTJEMbFf3qNkhikXjmRHhI,33909
335
335
  warp/tests/test_volume_write.py,sha256=VMy40l3ioInNovw-ooz7-o1vdVPK-kMkEXd1-cb309E,11531
@@ -352,8 +352,8 @@ warp/thirdparty/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
352
352
  warp/thirdparty/appdirs.py,sha256=2UXPK-AkDGoN5APeqAMMYkkfgf3Q_aUEZxcfkIxlQn0,24254
353
353
  warp/thirdparty/dlpack.py,sha256=OzMyVi5uQU01n0yEquDotgYvEAmfXT93QaIV4p4QqB4,4273
354
354
  warp/thirdparty/unittest_parallel.py,sha256=5z6oi9tsk2fOxhP4fx8hXRGveDTLM9fcESfzMWxJLFs,20998
355
- warp_lang-1.2.1.dist-info/LICENSE.md,sha256=Gq_TN0Xfat8Ftq2Rlvc31NgxdpLGVB-34kp-4eoeDV0,19265
356
- warp_lang-1.2.1.dist-info/METADATA,sha256=INLOWhLJDd8U5LCSIPBYnF791H3AH37SxdPKSpr3eMk,20615
357
- warp_lang-1.2.1.dist-info/WHEEL,sha256=tlJxHuB9B338XjSv8YGiDebYqhyHpN1cFwihGfSw9Hw,110
358
- warp_lang-1.2.1.dist-info/top_level.txt,sha256=8pupHORyKoiN_BYWlTmv5OFBWdhqpppiBYQV5KxgEvg,5
359
- warp_lang-1.2.1.dist-info/RECORD,,
355
+ warp_lang-1.2.2.dist-info/LICENSE.md,sha256=Gq_TN0Xfat8Ftq2Rlvc31NgxdpLGVB-34kp-4eoeDV0,19265
356
+ warp_lang-1.2.2.dist-info/METADATA,sha256=pFezgRswKflUhG_fCs5O56jEEZvH_MHJ92tIXXlKQso,20615
357
+ warp_lang-1.2.2.dist-info/WHEEL,sha256=tlJxHuB9B338XjSv8YGiDebYqhyHpN1cFwihGfSw9Hw,110
358
+ warp_lang-1.2.2.dist-info/top_level.txt,sha256=8pupHORyKoiN_BYWlTmv5OFBWdhqpppiBYQV5KxgEvg,5
359
+ warp_lang-1.2.2.dist-info/RECORD,,