warp-lang 1.8.0__py3-none-manylinux_2_34_aarch64.whl → 1.8.1__py3-none-manylinux_2_34_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/bin/warp-clang.so +0 -0
- warp/bin/warp.so +0 -0
- warp/build_dll.py +5 -0
- warp/codegen.py +15 -3
- warp/config.py +1 -1
- warp/context.py +122 -24
- warp/examples/interop/example_jax_callable.py +34 -4
- warp/examples/interop/example_jax_kernel.py +27 -1
- warp/fem/field/virtual.py +2 -0
- warp/fem/integrate.py +78 -47
- warp/jax_experimental/ffi.py +201 -53
- warp/native/array.h +4 -4
- warp/native/builtin.h +8 -4
- warp/native/coloring.cpp +5 -1
- warp/native/cuda_util.cpp +1 -1
- warp/native/intersect.h +2 -2
- warp/native/mat.h +3 -3
- warp/native/mesh.h +1 -1
- warp/native/quat.h +6 -2
- warp/native/rand.h +7 -7
- warp/native/sparse.cu +1 -1
- warp/native/svd.h +23 -8
- warp/native/tile.h +20 -1
- warp/native/tile_radix_sort.h +5 -1
- warp/native/tile_reduce.h +16 -25
- warp/native/tuple.h +2 -2
- warp/native/vec.h +4 -4
- warp/native/warp.cpp +1 -1
- warp/native/warp.cu +15 -2
- warp/native/warp.h +1 -1
- warp/render/render_opengl.py +52 -51
- warp/render/render_usd.py +0 -1
- warp/sim/collide.py +1 -2
- warp/sim/integrator_vbd.py +10 -2
- warp/sparse.py +1 -1
- warp/tape.py +2 -0
- warp/tests/sim/test_cloth.py +89 -6
- warp/tests/sim/test_coloring.py +76 -1
- warp/tests/test_assert.py +53 -0
- warp/tests/test_atomic_cas.py +127 -114
- warp/tests/test_mat.py +22 -0
- warp/tests/test_quat.py +22 -0
- warp/tests/test_sparse.py +32 -0
- warp/tests/test_static.py +48 -0
- warp/tests/test_tape.py +38 -0
- warp/tests/test_vec.py +38 -408
- warp/tests/test_vec_constructors.py +325 -0
- warp/tests/tile/test_tile.py +31 -143
- warp/tests/tile/test_tile_mathdx.py +2 -2
- warp/tests/tile/test_tile_matmul.py +179 -0
- warp/tests/tile/test_tile_reduce.py +100 -11
- warp/tests/tile/test_tile_shared_memory.py +12 -12
- warp/tests/tile/test_tile_sort.py +59 -55
- warp/tests/unittest_suites.py +10 -0
- {warp_lang-1.8.0.dist-info → warp_lang-1.8.1.dist-info}/METADATA +4 -4
- {warp_lang-1.8.0.dist-info → warp_lang-1.8.1.dist-info}/RECORD +59 -57
- {warp_lang-1.8.0.dist-info → warp_lang-1.8.1.dist-info}/WHEEL +0 -0
- {warp_lang-1.8.0.dist-info → warp_lang-1.8.1.dist-info}/licenses/LICENSE.md +0 -0
- {warp_lang-1.8.0.dist-info → warp_lang-1.8.1.dist-info}/top_level.txt +0 -0
warp/fem/integrate.py
CHANGED
|
@@ -56,7 +56,7 @@ from warp.fem.types import (
|
|
|
56
56
|
)
|
|
57
57
|
from warp.fem.utils import type_zero_element
|
|
58
58
|
from warp.sparse import BsrMatrix, bsr_set_from_triplets, bsr_zeros
|
|
59
|
-
from warp.types import type_size
|
|
59
|
+
from warp.types import is_array, type_size
|
|
60
60
|
from warp.utils import array_cast
|
|
61
61
|
|
|
62
62
|
|
|
@@ -1328,21 +1328,28 @@ def _launch_integrate_kernel(
|
|
|
1328
1328
|
device=device,
|
|
1329
1329
|
)
|
|
1330
1330
|
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1331
|
+
if test.TAYLOR_DOF_COUNT == 0:
|
|
1332
|
+
wp.utils.warn(
|
|
1333
|
+
f"Test field is never evaluated in integrand '{integrand.name}', result will be zero",
|
|
1334
|
+
category=UserWarning,
|
|
1335
|
+
stacklevel=2,
|
|
1336
|
+
)
|
|
1337
|
+
else:
|
|
1338
|
+
dispatch_kernel = make_linear_dispatch_kernel(test, quadrature, accumulate_dtype)
|
|
1339
|
+
wp.launch(
|
|
1340
|
+
kernel=dispatch_kernel,
|
|
1341
|
+
dim=(test.space_restriction.node_count(), test.node_dof_count),
|
|
1342
|
+
inputs=[
|
|
1343
|
+
qp_arg,
|
|
1344
|
+
domain_elt_arg,
|
|
1345
|
+
domain_elt_index_arg,
|
|
1346
|
+
test_arg,
|
|
1347
|
+
test.space.space_arg_value(device),
|
|
1348
|
+
local_result.array,
|
|
1349
|
+
output_view,
|
|
1350
|
+
],
|
|
1351
|
+
device=device,
|
|
1352
|
+
)
|
|
1346
1353
|
|
|
1347
1354
|
local_result.release()
|
|
1348
1355
|
|
|
@@ -1459,34 +1466,42 @@ def _launch_integrate_kernel(
|
|
|
1459
1466
|
dtype=vec_array_dtype,
|
|
1460
1467
|
)
|
|
1461
1468
|
|
|
1462
|
-
|
|
1469
|
+
if test.TAYLOR_DOF_COUNT * trial.TAYLOR_DOF_COUNT == 0:
|
|
1470
|
+
wp.utils.warn(
|
|
1471
|
+
f"Test and/or trial fields are never evaluated in integrand '{integrand.name}', result will be zero",
|
|
1472
|
+
category=UserWarning,
|
|
1473
|
+
stacklevel=2,
|
|
1474
|
+
)
|
|
1475
|
+
triplet_rows.fill_(-1)
|
|
1476
|
+
else:
|
|
1477
|
+
dispatch_kernel = make_bilinear_dispatch_kernel(test, trial, quadrature, accumulate_dtype)
|
|
1463
1478
|
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1479
|
+
trial_partition_arg = trial.space_partition.partition_arg_value(device)
|
|
1480
|
+
trial_topology_arg = trial.space_partition.space_topology.topo_arg_value(device)
|
|
1481
|
+
wp.launch(
|
|
1482
|
+
kernel=dispatch_kernel,
|
|
1483
|
+
dim=(
|
|
1484
|
+
test.space_restriction.node_count(),
|
|
1485
|
+
test.node_dof_count,
|
|
1486
|
+
trial.node_dof_count,
|
|
1487
|
+
trial.space.topology.MAX_NODES_PER_ELEMENT,
|
|
1488
|
+
),
|
|
1489
|
+
inputs=[
|
|
1490
|
+
qp_arg,
|
|
1491
|
+
domain_elt_arg,
|
|
1492
|
+
domain_elt_index_arg,
|
|
1493
|
+
test_arg,
|
|
1494
|
+
test.space.space_arg_value(device),
|
|
1495
|
+
trial_partition_arg,
|
|
1496
|
+
trial_topology_arg,
|
|
1497
|
+
trial.space.space_arg_value(device),
|
|
1498
|
+
local_result_as_vec,
|
|
1499
|
+
triplet_rows,
|
|
1500
|
+
triplet_cols,
|
|
1501
|
+
triplet_values,
|
|
1502
|
+
],
|
|
1503
|
+
device=device,
|
|
1504
|
+
)
|
|
1490
1505
|
|
|
1491
1506
|
local_result.release()
|
|
1492
1507
|
|
|
@@ -2207,6 +2222,9 @@ def _launch_interpolate_kernel(
|
|
|
2207
2222
|
return
|
|
2208
2223
|
|
|
2209
2224
|
if quadrature is None:
|
|
2225
|
+
if dest is not None and (not is_array(dest) or dest.shape[0] != dim):
|
|
2226
|
+
raise ValueError(f"dest must be a warp array with {dim} rows")
|
|
2227
|
+
|
|
2210
2228
|
wp.launch(
|
|
2211
2229
|
kernel=kernel,
|
|
2212
2230
|
dim=dim,
|
|
@@ -2216,21 +2234,34 @@ def _launch_interpolate_kernel(
|
|
|
2216
2234
|
return
|
|
2217
2235
|
|
|
2218
2236
|
qp_arg = quadrature.arg_value(device)
|
|
2237
|
+
qp_eval_count = quadrature.evaluation_point_count()
|
|
2238
|
+
qp_index_count = quadrature.total_point_count()
|
|
2239
|
+
|
|
2240
|
+
if qp_eval_count != qp_index_count:
|
|
2241
|
+
wp.utils.warn(
|
|
2242
|
+
f"Quadrature used for interpolation of {integrand.name} has different number of evaluation and indexed points, this may lead to incorrect results",
|
|
2243
|
+
category=UserWarning,
|
|
2244
|
+
stacklevel=2,
|
|
2245
|
+
)
|
|
2246
|
+
|
|
2219
2247
|
qp_element_index_arg = quadrature.element_index_arg_value(device)
|
|
2220
2248
|
if trial is None:
|
|
2249
|
+
if dest is not None and (not is_array(dest) or dest.shape[0] != qp_index_count):
|
|
2250
|
+
raise ValueError(f"dest must be a warp array with {qp_index_count} rows")
|
|
2251
|
+
|
|
2221
2252
|
wp.launch(
|
|
2222
2253
|
kernel=kernel,
|
|
2223
|
-
dim=
|
|
2254
|
+
dim=qp_eval_count,
|
|
2224
2255
|
inputs=[qp_arg, qp_element_index_arg, elt_arg, elt_index_arg, field_arg_values, value_struct_values, dest],
|
|
2225
2256
|
device=device,
|
|
2226
2257
|
)
|
|
2227
2258
|
return
|
|
2228
2259
|
|
|
2229
|
-
nnz =
|
|
2260
|
+
nnz = qp_eval_count * trial.space.topology.MAX_NODES_PER_ELEMENT
|
|
2230
2261
|
|
|
2231
|
-
if dest.nrow !=
|
|
2262
|
+
if dest.nrow != qp_index_count or dest.ncol != trial.space_partition.node_count():
|
|
2232
2263
|
raise RuntimeError(
|
|
2233
|
-
f"'dest' matrix must have {
|
|
2264
|
+
f"'dest' matrix must have {qp_index_count} rows and {trial.space_partition.node_count()} columns of blocks"
|
|
2234
2265
|
)
|
|
2235
2266
|
if dest.block_shape[1] != trial.node_dof_count:
|
|
2236
2267
|
raise RuntimeError(f"'dest' matrix blocks must have {trial.node_dof_count} columns")
|