warp-lang 1.3.2__py3-none-manylinux2014_aarch64.whl → 1.3.3__py3-none-manylinux2014_aarch64.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 +1 -1
- warp/tests/test_array.py +34 -0
- warp/tests/test_volume.py +30 -0
- warp/types.py +7 -6
- {warp_lang-1.3.2.dist-info → warp_lang-1.3.3.dist-info}/METADATA +4 -4
- {warp_lang-1.3.2.dist-info → warp_lang-1.3.3.dist-info}/RECORD +9 -9
- {warp_lang-1.3.2.dist-info → warp_lang-1.3.3.dist-info}/LICENSE.md +0 -0
- {warp_lang-1.3.2.dist-info → warp_lang-1.3.3.dist-info}/WHEEL +0 -0
- {warp_lang-1.3.2.dist-info → warp_lang-1.3.3.dist-info}/top_level.txt +0 -0
warp/config.py
CHANGED
warp/tests/test_array.py
CHANGED
|
@@ -2295,6 +2295,39 @@ def test_array_from_numpy(test, device):
|
|
|
2295
2295
|
assert_np_equal(result.numpy(), expected.numpy())
|
|
2296
2296
|
|
|
2297
2297
|
|
|
2298
|
+
def test_array_aliasing_from_numpy(test, device):
|
|
2299
|
+
device = wp.get_device(device)
|
|
2300
|
+
assert device.is_cpu
|
|
2301
|
+
|
|
2302
|
+
a_np = np.ones(8, dtype=np.int32)
|
|
2303
|
+
a_wp = wp.array(a_np, dtype=int, copy=False, device=device)
|
|
2304
|
+
test.assertIs(a_wp._ref, a_np) # check that some ref is kept to original array
|
|
2305
|
+
test.assertEqual(a_wp.ptr, a_np.ctypes.data)
|
|
2306
|
+
|
|
2307
|
+
a_np_2 = a_wp.numpy()
|
|
2308
|
+
test.assertTrue((a_np_2 == 1).all())
|
|
2309
|
+
|
|
2310
|
+
# updating source array should update aliased array
|
|
2311
|
+
a_np.fill(2)
|
|
2312
|
+
test.assertTrue((a_np_2 == 2).all())
|
|
2313
|
+
|
|
2314
|
+
# trying to alias from a different type should do a copy
|
|
2315
|
+
# do it twice to check that the copy buffer is not being reused for different arrays
|
|
2316
|
+
|
|
2317
|
+
b_np = np.ones(8, dtype=np.int64)
|
|
2318
|
+
c_np = np.zeros(8, dtype=np.int64)
|
|
2319
|
+
b_wp = wp.array(b_np, dtype=int, copy=False, device=device)
|
|
2320
|
+
c_wp = wp.array(c_np, dtype=int, copy=False, device=device)
|
|
2321
|
+
|
|
2322
|
+
test.assertNotEqual(b_wp.ptr, b_np.ctypes.data)
|
|
2323
|
+
test.assertNotEqual(b_wp.ptr, c_wp.ptr)
|
|
2324
|
+
|
|
2325
|
+
b_np_2 = b_wp.numpy()
|
|
2326
|
+
c_np_2 = c_wp.numpy()
|
|
2327
|
+
test.assertTrue((b_np_2 == 1).all())
|
|
2328
|
+
test.assertTrue((c_np_2 == 0).all())
|
|
2329
|
+
|
|
2330
|
+
|
|
2298
2331
|
def test_array_from_cai(test, device):
|
|
2299
2332
|
import torch
|
|
2300
2333
|
|
|
@@ -2447,6 +2480,7 @@ add_function_test(TestArray, "test_array_of_structs_grad", test_array_of_structs
|
|
|
2447
2480
|
add_function_test(TestArray, "test_array_of_structs_from_numpy", test_array_of_structs_from_numpy, devices=devices)
|
|
2448
2481
|
add_function_test(TestArray, "test_array_of_structs_roundtrip", test_array_of_structs_roundtrip, devices=devices)
|
|
2449
2482
|
add_function_test(TestArray, "test_array_from_numpy", test_array_from_numpy, devices=devices)
|
|
2483
|
+
add_function_test(TestArray, "test_array_aliasing_from_numpy", test_array_aliasing_from_numpy, devices=["cpu"])
|
|
2450
2484
|
|
|
2451
2485
|
add_function_test(TestArray, "test_direct_from_numpy", test_direct_from_numpy, devices=["cpu"])
|
|
2452
2486
|
add_function_test(TestArray, "test_kernel_array_from_ptr", test_kernel_array_from_ptr, devices=devices)
|
warp/tests/test_volume.py
CHANGED
|
@@ -843,6 +843,33 @@ def test_volume_from_numpy(test, device):
|
|
|
843
843
|
test.assertIsNone(sphere_vdb_array.deleter)
|
|
844
844
|
|
|
845
845
|
|
|
846
|
+
def test_volume_from_numpy_3d(test, device):
|
|
847
|
+
# Volume.allocate_from_tiles() is only available with CUDA
|
|
848
|
+
mins = np.array([-3.0, -3.0, -3.0])
|
|
849
|
+
voxel_size = 0.2
|
|
850
|
+
maxs = np.array([3.0, 3.0, 3.0])
|
|
851
|
+
nums = np.ceil((maxs - mins) / (voxel_size)).astype(dtype=int)
|
|
852
|
+
centers = np.array([[-1.0, -1.0, -1.0], [0.0, 0.0, 0.0], [1.0, 1.0, 1.0]])
|
|
853
|
+
rad = 2.5
|
|
854
|
+
sphere_sdf_np = np.zeros(tuple(nums) + (3,))
|
|
855
|
+
for x in range(nums[0]):
|
|
856
|
+
for y in range(nums[1]):
|
|
857
|
+
for z in range(nums[2]):
|
|
858
|
+
for k in range(3):
|
|
859
|
+
pos = mins + voxel_size * np.array([x, y, z])
|
|
860
|
+
dis = np.linalg.norm(pos - centers[k])
|
|
861
|
+
sphere_sdf_np[x, y, z, k] = dis - rad
|
|
862
|
+
sphere_vdb = wp.Volume.load_from_numpy(
|
|
863
|
+
sphere_sdf_np, mins, voxel_size, (rad + 3.0 * voxel_size,) * 3, device=device
|
|
864
|
+
)
|
|
865
|
+
|
|
866
|
+
test.assertNotEqual(sphere_vdb.id, 0)
|
|
867
|
+
|
|
868
|
+
sphere_vdb_array = sphere_vdb.array()
|
|
869
|
+
test.assertEqual(sphere_vdb_array.dtype, wp.uint8)
|
|
870
|
+
test.assertIsNone(sphere_vdb_array.deleter)
|
|
871
|
+
|
|
872
|
+
|
|
846
873
|
def test_volume_aniso_transform(test, device):
|
|
847
874
|
# XY-rotation + z scale
|
|
848
875
|
transform = [
|
|
@@ -894,6 +921,9 @@ add_function_test(TestVolume, "test_volume_introspection", test_volume_introspec
|
|
|
894
921
|
add_function_test(
|
|
895
922
|
TestVolume, "test_volume_from_numpy", test_volume_from_numpy, devices=get_selected_cuda_test_devices()
|
|
896
923
|
)
|
|
924
|
+
add_function_test(
|
|
925
|
+
TestVolume, "test_volume_from_numpy_3d", test_volume_from_numpy_3d, devices=get_selected_cuda_test_devices()
|
|
926
|
+
)
|
|
897
927
|
add_function_test(
|
|
898
928
|
TestVolume, "test_volume_aniso_transform", test_volume_aniso_transform, devices=get_selected_cuda_test_devices()
|
|
899
929
|
)
|
warp/types.py
CHANGED
|
@@ -1601,6 +1601,9 @@ class array(Array):
|
|
|
1601
1601
|
self._array_interface = None
|
|
1602
1602
|
self.is_transposed = False
|
|
1603
1603
|
|
|
1604
|
+
# reference to other array
|
|
1605
|
+
self._ref = None
|
|
1606
|
+
|
|
1604
1607
|
# canonicalize dtype
|
|
1605
1608
|
if dtype == int:
|
|
1606
1609
|
dtype = int32
|
|
@@ -1652,9 +1655,6 @@ class array(Array):
|
|
|
1652
1655
|
if requires_grad:
|
|
1653
1656
|
self._alloc_grad()
|
|
1654
1657
|
|
|
1655
|
-
# reference to other array
|
|
1656
|
-
self._ref = None
|
|
1657
|
-
|
|
1658
1658
|
def _init_from_data(self, data, dtype, shape, device, copy, pinned):
|
|
1659
1659
|
if not hasattr(data, "__len__"):
|
|
1660
1660
|
raise RuntimeError(f"Data must be a sequence or array, got scalar {data}")
|
|
@@ -2991,7 +2991,7 @@ class Mesh:
|
|
|
2991
2991
|
|
|
2992
2992
|
Args:
|
|
2993
2993
|
points (:class:`warp.array`): Array of vertex positions of type :class:`warp.vec3`
|
|
2994
|
-
indices (:class:`warp.array`): Array of triangle indices of type :class:`warp.int32`, should be a 1d array with shape (num_tris
|
|
2994
|
+
indices (:class:`warp.array`): Array of triangle indices of type :class:`warp.int32`, should be a 1d array with shape (num_tris * 3)
|
|
2995
2995
|
velocities (:class:`warp.array`): Array of vertex velocities of type :class:`warp.vec3` (optional)
|
|
2996
2996
|
support_winding_number (bool): If true the mesh will build additional datastructures to support `wp.mesh_query_point_sign_winding_number()` queries
|
|
2997
2997
|
"""
|
|
@@ -3529,8 +3529,9 @@ class Volume:
|
|
|
3529
3529
|
)
|
|
3530
3530
|
if hasattr(bg_value, "__len__"):
|
|
3531
3531
|
# vec3, assuming the numpy array is 4D
|
|
3532
|
-
padded_array = np.
|
|
3533
|
-
|
|
3532
|
+
padded_array = np.full(
|
|
3533
|
+
shape=(target_shape[0], target_shape[1], target_shape[2], 3), fill_value=bg_value, dtype=np.single
|
|
3534
|
+
)
|
|
3534
3535
|
padded_array[0 : ndarray.shape[0], 0 : ndarray.shape[1], 0 : ndarray.shape[2], :] = ndarray
|
|
3535
3536
|
else:
|
|
3536
3537
|
padded_amount = (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: warp-lang
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.3
|
|
4
4
|
Summary: A Python framework for high-performance simulation and graphics programming
|
|
5
5
|
Author-email: NVIDIA Corporation <mmacklin@nvidia.com>
|
|
6
6
|
License: NVIDIA Software License
|
|
@@ -77,9 +77,9 @@ the `pip install` command, e.g.
|
|
|
77
77
|
|
|
78
78
|
| Platform | Install Command |
|
|
79
79
|
| --------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
80
|
-
| Linux aarch64 | `pip install https://github.com/NVIDIA/warp/releases/download/v1.3.
|
|
81
|
-
| Linux x86-64 | `pip install https://github.com/NVIDIA/warp/releases/download/v1.3.
|
|
82
|
-
| Windows x86-64 | `pip install https://github.com/NVIDIA/warp/releases/download/v1.3.
|
|
80
|
+
| Linux aarch64 | `pip install https://github.com/NVIDIA/warp/releases/download/v1.3.3/warp_lang-1.3.3+cu11-py3-none-manylinux2014_aarch64.whl` |
|
|
81
|
+
| Linux x86-64 | `pip install https://github.com/NVIDIA/warp/releases/download/v1.3.3/warp_lang-1.3.3+cu11-py3-none-manylinux2014_x86_64.whl` |
|
|
82
|
+
| Windows x86-64 | `pip install https://github.com/NVIDIA/warp/releases/download/v1.3.3/warp_lang-1.3.3+cu11-py3-none-win_amd64.whl` |
|
|
83
83
|
|
|
84
84
|
The `--force-reinstall` option may need to be used to overwrite a previous installation.
|
|
85
85
|
|
|
@@ -5,7 +5,7 @@ warp/build.py,sha256=N2-SDksxkffUkzV97dtLW2Wjqd5ERfgwpqzVoe8GNRw,3904
|
|
|
5
5
|
warp/build_dll.py,sha256=p9eTXMhKbI0uTkpqeY5DxOmVhupfaykM-a-re6fXBXg,15896
|
|
6
6
|
warp/builtins.py,sha256=2eqAYDotCCaZ2pdDLNWLSqTM_qnMb9O9O-OfkZpj4Yg,142275
|
|
7
7
|
warp/codegen.py,sha256=bwWinPrKbCBm_2xLywCJDAgpWhEoo4i4zmeCTklCWJo,116383
|
|
8
|
-
warp/config.py,sha256=
|
|
8
|
+
warp/config.py,sha256=Wc2uujoeByAWRwCusQR0_YCesd2VyWnzf0MST70hwl0,2808
|
|
9
9
|
warp/constants.py,sha256=ckfEqwbg109RJDW98SILe_yfOBEFolOATVjt0mU2py4,1321
|
|
10
10
|
warp/context.py,sha256=wHh56A2qHp9CKWSpN8-P_sQNWBfOS0RMTXMMVqi1Jjs,226312
|
|
11
11
|
warp/dlpack.py,sha256=Ol_wrve9k6ipSarDpNGlHoEH4KRFJucz09Aqvtgccs8,16777
|
|
@@ -16,7 +16,7 @@ warp/sparse.py,sha256=APAp2M2FNpmOaQkI-ddxjluEcwJ-Ua2plNwq8IdP_Gw,64640
|
|
|
16
16
|
warp/stubs.py,sha256=0TKzfYAuQR9_gGk3TRzJhvHdjSUkAL2KlBXdD6Q73-U,51776
|
|
17
17
|
warp/tape.py,sha256=w96cmAIWTEvmUCvFVoNp3qMO2CCI934CjwE-7buPpDw,48988
|
|
18
18
|
warp/torch.py,sha256=jv3SYQHVKsiCzenlWUVmVs5mLYfsWcdTW446IqvEwVA,14505
|
|
19
|
-
warp/types.py,sha256=
|
|
19
|
+
warp/types.py,sha256=L18PVTGCluXFX6smghknfhpbtMcI8TOPaptzD1MsiTY,176638
|
|
20
20
|
warp/utils.py,sha256=wwyxRAujKkpdm-sB4pX5upAEgLv5RymOi6pQoNOUs-I,34663
|
|
21
21
|
warp/bin/warp-clang.so,sha256=hcnCbX_yQWdlKKhPJ1-divB8qY-MRmE5nIW6C1Mkj3g,52883864
|
|
22
22
|
warp/bin/warp.so,sha256=qCu2su90l7EYpbREv9xUexXn2yTZtNNu062CAT8nhNQ,135657384
|
|
@@ -254,7 +254,7 @@ warp/tests/disabled_kinematics.py,sha256=B8M_ih-JAobZA6-zPmtqSYGBCbKRyjtW2obR82i
|
|
|
254
254
|
warp/tests/run_coverage_serial.py,sha256=UjcqNXQixQk13U3Lckm2OlmqPKKzUk_KaBPyHzxkdT4,1045
|
|
255
255
|
warp/tests/test_adam.py,sha256=u5efgdobQgGdJilsCALB0TKZO5M5T8JDQ8pD3L0CApE,5361
|
|
256
256
|
warp/tests/test_arithmetic.py,sha256=ISNFQYSSRIpl7vEJNxOR0AqfWegdewYZznJ588ZAwX4,43840
|
|
257
|
-
warp/tests/test_array.py,sha256=
|
|
257
|
+
warp/tests/test_array.py,sha256=DZhZYdrwrA1lG-rvSJ3FaR1iYU9auCQvxmChsCzqDKo,88589
|
|
258
258
|
warp/tests/test_array_reduce.py,sha256=LH_nUdEPuc-FDRelqgO4c5wK5lU6SPpR4s9IcA5Wktw,4678
|
|
259
259
|
warp/tests/test_async.py,sha256=YKFNJVT7R3gGXPuHAXBkZ8VIzBrfnqUsj-tXyHKUgbQ,26498
|
|
260
260
|
warp/tests/test_atomic.py,sha256=jnzNwf6EsECVMfqf-wkgwzeqNa0WxzGLEILe8s-Zi9I,5343
|
|
@@ -341,7 +341,7 @@ warp/tests/test_vec.py,sha256=VRzPlnNwOX-AIoQpxNHzSirjTrTY8aPo7rFsPL-t0hc,40808
|
|
|
341
341
|
warp/tests/test_vec_lite.py,sha256=c1yKwqWSSzCHUd2Ft1TSNpUpqrHAwF2rWBjQj5nDZQ4,2370
|
|
342
342
|
warp/tests/test_vec_scalar_ops.py,sha256=j_1OW-uCcxayC3DsuFBeypW2lgotQZlGJjA5JAWOjew,88042
|
|
343
343
|
warp/tests/test_verify_fp.py,sha256=YVBgLM0CTGMUnMwNYZOcj-BU2sz2zhItfY4RYutKd28,2337
|
|
344
|
-
warp/tests/test_volume.py,sha256=
|
|
344
|
+
warp/tests/test_volume.py,sha256=GpMZQA-iFS57AWrWhrJtZ0Z7e6B_YCVm_7yJhC2ILlU,36125
|
|
345
345
|
warp/tests/test_volume_write.py,sha256=_QhIY9WotnS_NQD00g4JR16p3JC_vLegiD_PXCG_UIQ,11525
|
|
346
346
|
warp/tests/unittest_serial.py,sha256=VXuwpkIo2tBgNnphZ4GDxFSHUVMupgGQWuDZFb64qr8,1134
|
|
347
347
|
warp/tests/unittest_suites.py,sha256=XfVRlR4IYKI03gDl9npPk-s5gMTsAJnBrq_h5LrsXhM,13645
|
|
@@ -362,8 +362,8 @@ warp/thirdparty/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
362
362
|
warp/thirdparty/appdirs.py,sha256=2UXPK-AkDGoN5APeqAMMYkkfgf3Q_aUEZxcfkIxlQn0,24254
|
|
363
363
|
warp/thirdparty/dlpack.py,sha256=OzMyVi5uQU01n0yEquDotgYvEAmfXT93QaIV4p4QqB4,4273
|
|
364
364
|
warp/thirdparty/unittest_parallel.py,sha256=-FgbXrKiQ_RDj7YXYyhpRIPC3OmvJEnjvGkN99cqQA0,20888
|
|
365
|
-
warp_lang-1.3.
|
|
366
|
-
warp_lang-1.3.
|
|
367
|
-
warp_lang-1.3.
|
|
368
|
-
warp_lang-1.3.
|
|
369
|
-
warp_lang-1.3.
|
|
365
|
+
warp_lang-1.3.3.dist-info/LICENSE.md,sha256=Gq_TN0Xfat8Ftq2Rlvc31NgxdpLGVB-34kp-4eoeDV0,19265
|
|
366
|
+
warp_lang-1.3.3.dist-info/METADATA,sha256=O17N1jUvTke6VTIPVPbiHDR32lG_2tHx5S-cK77kht4,23145
|
|
367
|
+
warp_lang-1.3.3.dist-info/WHEEL,sha256=x1fNTIFmrgdGi9cv8BF6yp8eLbJ9uVVTmpMQAxKGwn0,111
|
|
368
|
+
warp_lang-1.3.3.dist-info/top_level.txt,sha256=8pupHORyKoiN_BYWlTmv5OFBWdhqpppiBYQV5KxgEvg,5
|
|
369
|
+
warp_lang-1.3.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|