v1.3.0
[1.3.0] - 2024-07-25
-
Warp Core improvements
- Update to CUDA 12.x by default (requires NVIDIA driver 525 or newer), please see README.md for commands to install CUDA 11.x binaries for older drivers
- Add information to the module load print outs to indicate whether a module was
compiled(compiled), loaded from the cache(cached), or was unable to be
loaded(error). wp.config.verbose = Truenow also prints out a message upon the entry to awp.ScopedTimer.- Add
wp.clear_kernel_cache()to the public API. This is equivalent towp.build.clear_kernel_cache(). - Add code-completion support for
wp.configvariables. - Remove usage of a static task (thread) index for CPU kernels to address multithreading concerns (GH-224)
- Improve error messages for unsupported Python operations such as sequence construction in kernels
- Update
wp.matmul()CPU fallback to use dtype explicitly innp.matmul()call - Add support for PEP 563's
from __future__ import annotations(GH-256). - Allow passing external arrays/tensors to
wp.launch()directly via__cuda_array_interface__and__array_interface__, up to 2.5x faster conversion from PyTorch - Add faster Torch interop path using
return_ctypeargument towp.from_torch() - Handle incompatible CUDA driver versions gracefully
- Add
wp.abs()andwp.sign()for vector types - Expose scalar arithmetic operators to Python's runtime (e.g.:
wp.float16(1.23) * wp.float16(2.34)) - Add support for creating volumes with anisotropic transforms
- Allow users to pass function arguments by keyword in a kernel using standard Python calling semantics
- Add additional documentation and examples demonstrating
wp.copy(),wp.clone(), andarray.assign()differentiability - Add
__new__()methods for all class__del__()methods to handle when a class instance is created but not instantiated before garbage collection - Implement the assignment operator for
wp.quat - Make the geometry-related built-ins available only from within kernels
- Rename the API-facing query types to remove their
_tsuffix:wp.BVHQuery,wp.HashGridQuery,wp.MeshQueryAABB,wp.MeshQueryPoint, andwp.MeshQueryRay - Add
wp.array(ptr=...)to allow initializing arrays from pointer addresses inside of kernels (GH-206)
-
warp.autogradimprovements:- New
warp.autogradmodule with utility functionsgradcheck(),jacobian(), andjacobian_fd()for debugging kernel Jacobians (docs) - Add array overwrite detection, if
wp.config.verify_autograd_array_accessis true in-place operations on arrays on the Tape that could break gradient computation will be detected (docs) - Fix bug where modification of
@wp.func_replayfunctions and native snippets would not trigger module recompilation - Add documentation for dynamic loop autograd limitations
- New
-
warp.simimprovements:- Improve memory usage and performance for rigid body contact handling when
self.rigid_mesh_contact_maxis zero (default behavior). - The
maskargument towp.sim.eval_fk()now accepts both integer and boolean arrays to mask articulations. - Fix handling of
ModelBuilder.joint_actinModelBuilder.collapse_fixed_joints()(affected floating-base systems) - Fix and improve implementation of
ModelBuilder.plot_articulation()to visualize the articulation tree of a rigid-body mechanism - Fix ShapeInstancer
__new__()method (missing instance return and*argsparameter) - Fix handling of
upaxisvariable inModelBuilderand the rendering thereof inOpenGLRenderer
- Improve memory usage and performance for rigid body contact handling when
-
warp.sparseimprovements:- Sparse matrix allocations (from
bsr_from_triplets(),bsr_axpy(), etc.) can now be captured in CUDA graphs; exact number of non-zeros can be optionally requested asynchronously. bsr_assign()now supports changing block shape (including CSR/BSR conversions)- Add Python operator overloads for common sparse matrix operations, e.g
A += 0.5 * B,y = x @ C
- Sparse matrix allocations (from
-
warp.femnew features and fixes:- Support for variable number of nodes per element
- Global
wp.fem.lookup()operator now supportswp.fem.Tetmeshandwp.fem.Trimesh2Dgeometries - Simplified defining custom subdomains (
wp.fem.Subdomain), free-slip boundary conditions - New field types:
wp.fem.UniformField,wp.fem.ImplicitFieldandwp.fem.NonconformingField - New
streamlines,magnetostaticsandnonconforming_contactexamples, updatedmixed_elasticityto use a nonlinear model - Function spaces can now export VTK-compatible cells for visualization
- Fixed edge cases with NanoVDB function spaces
- Fixed differentiability of
wp.fem.PicQuadraturew.r.t. positions and measures