warp-lang 1.5.1__py3-none-macosx_10_13_universal2.whl → 1.6.1__py3-none-macosx_10_13_universal2.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/__init__.py +5 -0
- warp/autograd.py +414 -191
- warp/bin/libwarp-clang.dylib +0 -0
- warp/bin/libwarp.dylib +0 -0
- warp/build.py +40 -12
- warp/build_dll.py +13 -6
- warp/builtins.py +1077 -481
- warp/codegen.py +250 -122
- warp/config.py +65 -21
- warp/context.py +500 -149
- warp/examples/assets/square_cloth.usd +0 -0
- warp/examples/benchmarks/benchmark_gemm.py +27 -18
- warp/examples/benchmarks/benchmark_interop_paddle.py +3 -3
- warp/examples/benchmarks/benchmark_interop_torch.py +3 -3
- warp/examples/core/example_marching_cubes.py +1 -1
- warp/examples/core/example_mesh.py +1 -1
- warp/examples/core/example_torch.py +18 -34
- warp/examples/core/example_wave.py +1 -1
- warp/examples/fem/example_apic_fluid.py +1 -0
- warp/examples/fem/example_mixed_elasticity.py +1 -1
- warp/examples/optim/example_bounce.py +1 -1
- warp/examples/optim/example_cloth_throw.py +1 -1
- warp/examples/optim/example_diffray.py +4 -15
- warp/examples/optim/example_drone.py +1 -1
- warp/examples/optim/example_softbody_properties.py +392 -0
- warp/examples/optim/example_trajectory.py +1 -3
- warp/examples/optim/example_walker.py +5 -0
- warp/examples/sim/example_cartpole.py +0 -2
- warp/examples/sim/example_cloth_self_contact.py +314 -0
- warp/examples/sim/example_granular_collision_sdf.py +4 -5
- warp/examples/sim/example_jacobian_ik.py +0 -2
- warp/examples/sim/example_quadruped.py +5 -2
- warp/examples/tile/example_tile_cholesky.py +79 -0
- warp/examples/tile/example_tile_convolution.py +2 -2
- warp/examples/tile/example_tile_fft.py +2 -2
- warp/examples/tile/example_tile_filtering.py +3 -3
- warp/examples/tile/example_tile_matmul.py +4 -4
- warp/examples/tile/example_tile_mlp.py +12 -12
- warp/examples/tile/example_tile_nbody.py +191 -0
- warp/examples/tile/example_tile_walker.py +319 -0
- warp/math.py +147 -0
- warp/native/array.h +12 -0
- warp/native/builtin.h +0 -1
- warp/native/bvh.cpp +149 -70
- warp/native/bvh.cu +287 -68
- warp/native/bvh.h +195 -85
- warp/native/clang/clang.cpp +6 -2
- warp/native/crt.h +1 -0
- warp/native/cuda_util.cpp +35 -0
- warp/native/cuda_util.h +5 -0
- warp/native/exports.h +40 -40
- warp/native/intersect.h +17 -0
- warp/native/mat.h +57 -3
- warp/native/mathdx.cpp +19 -0
- warp/native/mesh.cpp +25 -8
- warp/native/mesh.cu +153 -101
- warp/native/mesh.h +482 -403
- warp/native/quat.h +40 -0
- warp/native/solid_angle.h +7 -0
- warp/native/sort.cpp +85 -0
- warp/native/sort.cu +34 -0
- warp/native/sort.h +3 -1
- warp/native/spatial.h +11 -0
- warp/native/tile.h +1189 -664
- warp/native/tile_reduce.h +8 -6
- warp/native/vec.h +41 -0
- warp/native/warp.cpp +8 -1
- warp/native/warp.cu +263 -40
- warp/native/warp.h +19 -5
- warp/optim/linear.py +22 -4
- warp/render/render_opengl.py +132 -59
- warp/render/render_usd.py +10 -2
- warp/sim/__init__.py +6 -1
- warp/sim/collide.py +289 -32
- warp/sim/import_urdf.py +20 -5
- warp/sim/integrator_euler.py +25 -7
- warp/sim/integrator_featherstone.py +147 -35
- warp/sim/integrator_vbd.py +842 -40
- warp/sim/model.py +173 -112
- warp/sim/render.py +2 -2
- warp/stubs.py +249 -116
- warp/tape.py +28 -30
- warp/tests/aux_test_module_unload.py +15 -0
- warp/tests/{test_sim_grad.py → flaky_test_sim_grad.py} +104 -63
- warp/tests/test_array.py +100 -0
- warp/tests/test_assert.py +242 -0
- warp/tests/test_codegen.py +14 -61
- warp/tests/test_collision.py +8 -8
- warp/tests/test_examples.py +16 -1
- warp/tests/test_grad_debug.py +87 -2
- warp/tests/test_hash_grid.py +1 -1
- warp/tests/test_ipc.py +116 -0
- warp/tests/test_launch.py +77 -26
- warp/tests/test_mat.py +213 -168
- warp/tests/test_math.py +47 -1
- warp/tests/test_matmul.py +11 -7
- warp/tests/test_matmul_lite.py +4 -4
- warp/tests/test_mesh.py +84 -60
- warp/tests/test_mesh_query_aabb.py +165 -0
- warp/tests/test_mesh_query_point.py +328 -286
- warp/tests/test_mesh_query_ray.py +134 -121
- warp/tests/test_mlp.py +2 -2
- warp/tests/test_operators.py +43 -0
- warp/tests/test_overwrite.py +6 -5
- warp/tests/test_quat.py +77 -0
- warp/tests/test_reload.py +29 -0
- warp/tests/test_sim_grad_bounce_linear.py +204 -0
- warp/tests/test_static.py +16 -0
- warp/tests/test_tape.py +25 -0
- warp/tests/test_tile.py +134 -191
- warp/tests/test_tile_load.py +399 -0
- warp/tests/test_tile_mathdx.py +61 -8
- warp/tests/test_tile_mlp.py +17 -17
- warp/tests/test_tile_reduce.py +24 -18
- warp/tests/test_tile_shared_memory.py +66 -17
- warp/tests/test_tile_view.py +165 -0
- warp/tests/test_torch.py +35 -0
- warp/tests/test_utils.py +36 -24
- warp/tests/test_vec.py +110 -0
- warp/tests/unittest_suites.py +29 -4
- warp/tests/unittest_utils.py +30 -11
- warp/thirdparty/unittest_parallel.py +5 -2
- warp/types.py +419 -111
- warp/utils.py +9 -5
- {warp_lang-1.5.1.dist-info → warp_lang-1.6.1.dist-info}/METADATA +86 -45
- {warp_lang-1.5.1.dist-info → warp_lang-1.6.1.dist-info}/RECORD +129 -118
- {warp_lang-1.5.1.dist-info → warp_lang-1.6.1.dist-info}/WHEEL +1 -1
- warp/examples/benchmarks/benchmark_tile.py +0 -179
- warp/native/tile_gemm.h +0 -341
- {warp_lang-1.5.1.dist-info → warp_lang-1.6.1.dist-info}/LICENSE.md +0 -0
- {warp_lang-1.5.1.dist-info → warp_lang-1.6.1.dist-info}/top_level.txt +0 -0
warp/tests/test_mesh.py
CHANGED
|
@@ -88,21 +88,27 @@ def read_indices_kernel(
|
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
def test_mesh_read_properties(test, device):
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
if device.is_cpu:
|
|
92
|
+
constructors = ["sah", "median"]
|
|
93
|
+
else:
|
|
94
|
+
constructors = ["sah", "median", "lbvh"]
|
|
94
95
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
for constructor in constructors:
|
|
97
|
+
points = wp.array(POINT_POSITIONS, dtype=wp.vec3, device=device)
|
|
98
|
+
indices = wp.array(RIGHT_HANDED_FACE_VERTEX_INDICES, dtype=int, device=device)
|
|
99
|
+
mesh = wp.Mesh(points=points, indices=indices, bvh_constructor=constructor)
|
|
98
100
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
assert mesh.points.size == POINT_COUNT
|
|
102
|
+
assert mesh.indices.size == VERTEX_COUNT
|
|
103
|
+
assert int(mesh.indices.size / 3) == FACE_COUNT
|
|
102
104
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
105
|
+
out_points = wp.empty(POINT_COUNT, dtype=wp.vec3, device=device)
|
|
106
|
+
wp.launch(read_points_kernel, dim=POINT_COUNT, inputs=[mesh.id], outputs=[out_points], device=device)
|
|
107
|
+
assert_np_equal(out_points.numpy(), np.array(POINT_POSITIONS))
|
|
108
|
+
|
|
109
|
+
out_indices = wp.empty(VERTEX_COUNT, dtype=int, device=device)
|
|
110
|
+
wp.launch(read_indices_kernel, dim=FACE_COUNT, inputs=[mesh.id], outputs=[out_indices], device=device)
|
|
111
|
+
assert_np_equal(out_indices.numpy(), np.array(RIGHT_HANDED_FACE_VERTEX_INDICES))
|
|
106
112
|
|
|
107
113
|
|
|
108
114
|
@wp.kernel(enable_backward=False)
|
|
@@ -127,17 +133,23 @@ def query_point_kernel(
|
|
|
127
133
|
|
|
128
134
|
|
|
129
135
|
def test_mesh_query_point(test, device):
|
|
130
|
-
|
|
136
|
+
if device.is_cpu:
|
|
137
|
+
constructors = ["sah", "median"]
|
|
138
|
+
else:
|
|
139
|
+
constructors = ["sah", "median", "lbvh"]
|
|
131
140
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
expected_sign = -1.0
|
|
135
|
-
wp.launch(query_point_kernel, dim=1, inputs=[mesh.id, expected_sign], device=device)
|
|
141
|
+
for constructor in constructors:
|
|
142
|
+
points = wp.array(POINT_POSITIONS, dtype=wp.vec3, device=device)
|
|
136
143
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
144
|
+
indices = wp.array(RIGHT_HANDED_FACE_VERTEX_INDICES, dtype=int, device=device)
|
|
145
|
+
mesh = wp.Mesh(points=points, indices=indices, bvh_constructor=constructor)
|
|
146
|
+
expected_sign = -1.0
|
|
147
|
+
wp.launch(query_point_kernel, dim=1, inputs=[mesh.id, expected_sign], device=device)
|
|
148
|
+
|
|
149
|
+
indices = wp.array(LEFT_HANDED_FACE_VERTEX_INDICES, dtype=int, device=device)
|
|
150
|
+
mesh = wp.Mesh(points=points, indices=indices)
|
|
151
|
+
expected_sign = 1.0
|
|
152
|
+
wp.launch(query_point_kernel, dim=1, inputs=[mesh.id, expected_sign], device=device)
|
|
141
153
|
|
|
142
154
|
|
|
143
155
|
@wp.kernel(enable_backward=False)
|
|
@@ -179,53 +191,65 @@ def query_ray_kernel(
|
|
|
179
191
|
|
|
180
192
|
|
|
181
193
|
def test_mesh_query_ray(test, device):
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
expected_sign = -1.0
|
|
187
|
-
wp.launch(
|
|
188
|
-
query_ray_kernel,
|
|
189
|
-
dim=1,
|
|
190
|
-
inputs=[
|
|
191
|
-
mesh.id,
|
|
192
|
-
expected_sign,
|
|
193
|
-
],
|
|
194
|
-
device=device,
|
|
195
|
-
)
|
|
194
|
+
if device.is_cpu:
|
|
195
|
+
constructors = ["sah", "median"]
|
|
196
|
+
else:
|
|
197
|
+
constructors = ["sah", "median", "lbvh"]
|
|
196
198
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
199
|
+
for constructor in constructors:
|
|
200
|
+
points = wp.array(POINT_POSITIONS, dtype=wp.vec3, device=device)
|
|
201
|
+
|
|
202
|
+
indices = wp.array(RIGHT_HANDED_FACE_VERTEX_INDICES, dtype=int, device=device)
|
|
203
|
+
mesh = wp.Mesh(points=points, indices=indices, bvh_constructor=constructor)
|
|
204
|
+
expected_sign = -1.0
|
|
205
|
+
wp.launch(
|
|
206
|
+
query_ray_kernel,
|
|
207
|
+
dim=1,
|
|
208
|
+
inputs=[
|
|
209
|
+
mesh.id,
|
|
210
|
+
expected_sign,
|
|
211
|
+
],
|
|
212
|
+
device=device,
|
|
213
|
+
)
|
|
214
|
+
|
|
215
|
+
indices = wp.array(LEFT_HANDED_FACE_VERTEX_INDICES, dtype=int, device=device)
|
|
216
|
+
mesh = wp.Mesh(points=points, indices=indices)
|
|
217
|
+
expected_sign = 1.0
|
|
218
|
+
wp.launch(
|
|
219
|
+
query_ray_kernel,
|
|
220
|
+
dim=1,
|
|
221
|
+
inputs=[
|
|
222
|
+
mesh.id,
|
|
223
|
+
expected_sign,
|
|
224
|
+
],
|
|
225
|
+
device=device,
|
|
226
|
+
)
|
|
209
227
|
|
|
210
228
|
|
|
211
229
|
def test_mesh_refit_graph(test, device):
|
|
212
|
-
|
|
230
|
+
if device.is_cpu:
|
|
231
|
+
constructors = ["sah", "median"]
|
|
232
|
+
else:
|
|
233
|
+
constructors = ["sah", "median", "lbvh"]
|
|
213
234
|
|
|
214
|
-
|
|
215
|
-
|
|
235
|
+
for constructor in constructors:
|
|
236
|
+
points = wp.array(POINT_POSITIONS, dtype=wp.vec3, device=device)
|
|
237
|
+
|
|
238
|
+
indices = wp.array(RIGHT_HANDED_FACE_VERTEX_INDICES, dtype=int, device=device)
|
|
239
|
+
mesh = wp.Mesh(points=points, indices=indices, bvh_constructor=constructor)
|
|
216
240
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
241
|
+
wp.capture_begin(device, force_module_load=False)
|
|
242
|
+
try:
|
|
243
|
+
mesh.refit()
|
|
244
|
+
finally:
|
|
245
|
+
graph = wp.capture_end(device)
|
|
222
246
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
247
|
+
# replay
|
|
248
|
+
num_iters = 10
|
|
249
|
+
for _ in range(num_iters):
|
|
250
|
+
wp.capture_launch(graph)
|
|
227
251
|
|
|
228
|
-
|
|
252
|
+
wp.synchronize_device(device)
|
|
229
253
|
|
|
230
254
|
|
|
231
255
|
def test_mesh_exceptions(test, device):
|
|
@@ -5,11 +5,13 @@
|
|
|
5
5
|
# distribution of this software and related documentation without an express
|
|
6
6
|
# license agreement from NVIDIA CORPORATION is strictly prohibited.
|
|
7
7
|
|
|
8
|
+
import os
|
|
8
9
|
import unittest
|
|
9
10
|
|
|
10
11
|
import numpy as np
|
|
11
12
|
|
|
12
13
|
import warp as wp
|
|
14
|
+
import warp.examples
|
|
13
15
|
from warp.tests.unittest_utils import *
|
|
14
16
|
|
|
15
17
|
|
|
@@ -192,6 +194,162 @@ def test_mesh_query_aabb_count_nonoverlap(test, device):
|
|
|
192
194
|
test.assertTrue(c == 1)
|
|
193
195
|
|
|
194
196
|
|
|
197
|
+
@wp.kernel
|
|
198
|
+
def compute_num_contact_with_checksums(
|
|
199
|
+
lowers: wp.array(dtype=wp.vec3),
|
|
200
|
+
uppers: wp.array(dtype=wp.vec3),
|
|
201
|
+
mesh_id: wp.uint64,
|
|
202
|
+
counts: wp.array(dtype=int),
|
|
203
|
+
check_sums: wp.array(dtype=int),
|
|
204
|
+
):
|
|
205
|
+
face_index = int(0)
|
|
206
|
+
face_u = float(0.0)
|
|
207
|
+
face_v = float(0.0)
|
|
208
|
+
sign = float(0.0)
|
|
209
|
+
|
|
210
|
+
tid = wp.tid()
|
|
211
|
+
|
|
212
|
+
upper = uppers[tid]
|
|
213
|
+
lower = lowers[tid]
|
|
214
|
+
|
|
215
|
+
query = wp.mesh_query_aabb(mesh_id, lower, upper)
|
|
216
|
+
count = int(0)
|
|
217
|
+
|
|
218
|
+
check_sum = int(0)
|
|
219
|
+
for _index in query:
|
|
220
|
+
check_sum = check_sum ^ _index
|
|
221
|
+
count = count + 1
|
|
222
|
+
|
|
223
|
+
counts[tid] = count
|
|
224
|
+
check_sums[tid] = check_sum
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
@wp.func
|
|
228
|
+
def intersect_aabb_aabb(a_lower: wp.vec3, a_upper: wp.vec3, b_lower: wp.vec3, b_upper: wp.vec3):
|
|
229
|
+
if (
|
|
230
|
+
a_lower[0] > b_upper[0]
|
|
231
|
+
or a_lower[1] > b_upper[1]
|
|
232
|
+
or a_lower[2] > b_upper[2]
|
|
233
|
+
or a_upper[0] < b_lower[0]
|
|
234
|
+
or a_upper[1] < b_lower[1]
|
|
235
|
+
or a_upper[2] < b_lower[2]
|
|
236
|
+
):
|
|
237
|
+
return False
|
|
238
|
+
else:
|
|
239
|
+
return True
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
@wp.kernel
|
|
243
|
+
def compute_num_contact_with_checksums_brutal(
|
|
244
|
+
lowers: wp.array(dtype=wp.vec3),
|
|
245
|
+
uppers: wp.array(dtype=wp.vec3),
|
|
246
|
+
mesh_points: wp.array(dtype=wp.vec3),
|
|
247
|
+
mesh_indices: wp.array(dtype=int),
|
|
248
|
+
counts: wp.array(dtype=int),
|
|
249
|
+
check_sums: wp.array(dtype=int),
|
|
250
|
+
):
|
|
251
|
+
tid = wp.tid()
|
|
252
|
+
|
|
253
|
+
upper = uppers[tid]
|
|
254
|
+
lower = lowers[tid]
|
|
255
|
+
|
|
256
|
+
check_sum = int(0)
|
|
257
|
+
count = int(0)
|
|
258
|
+
num_faces = mesh_indices.shape[0] / 3
|
|
259
|
+
|
|
260
|
+
for face in range(num_faces):
|
|
261
|
+
i = mesh_indices[face * 3 + 0]
|
|
262
|
+
j = mesh_indices[face * 3 + 1]
|
|
263
|
+
k = mesh_indices[face * 3 + 2]
|
|
264
|
+
|
|
265
|
+
x0 = mesh_points[i] # point zero
|
|
266
|
+
x1 = mesh_points[j] # point one
|
|
267
|
+
x2 = mesh_points[k] # point two
|
|
268
|
+
|
|
269
|
+
tri_lower = min_vec3(min_vec3(x0, x1), x2)
|
|
270
|
+
tri_upper = max_vec3(max_vec3(x0, x1), x2)
|
|
271
|
+
|
|
272
|
+
if intersect_aabb_aabb(lower, upper, tri_lower, tri_upper):
|
|
273
|
+
check_sum = check_sum ^ face
|
|
274
|
+
count = count + 1
|
|
275
|
+
|
|
276
|
+
counts[tid] = count
|
|
277
|
+
check_sums[tid] = check_sum
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
def load_mesh():
|
|
281
|
+
from pxr import Usd, UsdGeom
|
|
282
|
+
|
|
283
|
+
usd_stage = Usd.Stage.Open(os.path.join(wp.examples.get_asset_directory(), "bunny.usd"))
|
|
284
|
+
usd_geom = UsdGeom.Mesh(usd_stage.GetPrimAtPath("/root/bunny"))
|
|
285
|
+
|
|
286
|
+
vertices = np.array(usd_geom.GetPointsAttr().Get())
|
|
287
|
+
faces = np.array(usd_geom.GetFaceVertexIndicesAttr().Get())
|
|
288
|
+
|
|
289
|
+
return vertices, faces
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
@unittest.skipUnless(USD_AVAILABLE, "Requires usd-core")
|
|
293
|
+
def test_mesh_query_aabb_count_overlap_with_checksum(test, device):
|
|
294
|
+
if device.is_cpu:
|
|
295
|
+
constructors = ["sah", "median"]
|
|
296
|
+
else:
|
|
297
|
+
constructors = ["sah", "median", "lbvh"]
|
|
298
|
+
|
|
299
|
+
points, indices = load_mesh()
|
|
300
|
+
points_wp = wp.array(points, dtype=wp.vec3, device=device)
|
|
301
|
+
indices_wp = wp.array(indices, dtype=int, device=device)
|
|
302
|
+
|
|
303
|
+
for constructor in constructors:
|
|
304
|
+
m = wp.Mesh(points=points_wp, indices=indices_wp, bvh_constructor=constructor)
|
|
305
|
+
|
|
306
|
+
num_test_bounds = 10000
|
|
307
|
+
test_bound_relative_size = 0.01
|
|
308
|
+
|
|
309
|
+
world_min = np.min(points, axis=0)
|
|
310
|
+
world_max = np.max(points, axis=0)
|
|
311
|
+
|
|
312
|
+
world_center = 0.5 * (world_min + world_max)
|
|
313
|
+
world_size = world_max - world_min
|
|
314
|
+
|
|
315
|
+
rng = np.random.default_rng(123)
|
|
316
|
+
|
|
317
|
+
centers = (
|
|
318
|
+
rng.uniform(-0.5, 0.5, size=num_test_bounds * 3).reshape(num_test_bounds, 3) * world_size + world_center
|
|
319
|
+
)
|
|
320
|
+
diffs = (
|
|
321
|
+
0.5 * test_bound_relative_size * rng.random(num_test_bounds * 3).reshape(num_test_bounds, 3) * world_size
|
|
322
|
+
)
|
|
323
|
+
|
|
324
|
+
lowers = wp.array(centers - diffs, dtype=wp.vec3, device=device)
|
|
325
|
+
uppers = wp.array(centers + diffs, dtype=wp.vec3, device=device)
|
|
326
|
+
|
|
327
|
+
counts = wp.empty(n=num_test_bounds, dtype=int, device=device)
|
|
328
|
+
checksums = wp.empty(n=num_test_bounds, dtype=int, device=device)
|
|
329
|
+
|
|
330
|
+
wp.launch(
|
|
331
|
+
kernel=compute_num_contact_with_checksums,
|
|
332
|
+
dim=num_test_bounds,
|
|
333
|
+
inputs=[lowers, uppers, m.id],
|
|
334
|
+
outputs=[counts, checksums],
|
|
335
|
+
device=device,
|
|
336
|
+
)
|
|
337
|
+
|
|
338
|
+
counts_brutal = wp.empty(n=num_test_bounds, dtype=int, device=device)
|
|
339
|
+
checksums_brutal = wp.empty(n=num_test_bounds, dtype=int, device=device)
|
|
340
|
+
|
|
341
|
+
wp.launch(
|
|
342
|
+
kernel=compute_num_contact_with_checksums_brutal,
|
|
343
|
+
dim=num_test_bounds,
|
|
344
|
+
inputs=[lowers, uppers, points_wp, indices_wp],
|
|
345
|
+
outputs=[counts_brutal, checksums_brutal],
|
|
346
|
+
device=device,
|
|
347
|
+
)
|
|
348
|
+
|
|
349
|
+
assert_array_equal(counts, counts_brutal)
|
|
350
|
+
assert_array_equal(checksums, checksums_brutal)
|
|
351
|
+
|
|
352
|
+
|
|
195
353
|
devices = get_test_devices()
|
|
196
354
|
|
|
197
355
|
|
|
@@ -220,6 +378,13 @@ add_function_test(
|
|
|
220
378
|
test_mesh_query_aabb_count_nonoverlap,
|
|
221
379
|
devices=devices,
|
|
222
380
|
)
|
|
381
|
+
add_function_test(
|
|
382
|
+
TestMeshQueryAABBMethods,
|
|
383
|
+
"test_mesh_query_aabb_count_overlap_with_checksum",
|
|
384
|
+
test_mesh_query_aabb_count_overlap_with_checksum,
|
|
385
|
+
devices=devices,
|
|
386
|
+
)
|
|
387
|
+
|
|
223
388
|
|
|
224
389
|
if __name__ == "__main__":
|
|
225
390
|
wp.clear_kernel_cache()
|