Skip to content

CUDA: incorrect Texture3D samples when texture handles vary across lanes #1811

Description

@SamdianJ

Bug Description

Sampling different wp.Texture3D objects from an array in adjacent CUDA lanes can return values from the wrong texture for one lane. The failure is deterministic, depends on lane order, and disappears when all lanes use the same texture handle.

This is visible with a two-lane kernel that evaluates a scalar texture value and a finite-difference gradient. Each texture is correct when launched alone. In a mixed [A, B] launch, lane 0 gets an incorrect gradient component while lane 1 remains correct. Reversing the order to [B, A] moves the failure to B. [A, A] and [B, B] are both correct.

repro_texture3d_divergence.py

System Information

  • Warp: 1.17.0.dev20260804 (warp-lang)
  • Python: 3.12.13
  • NumPy: 2.3.1
  • GPU: NVIDIA GeForce RTX 5070 Ti Laptop GPU, sm_120
  • NVIDIA driver: 570.211.01
  • Warp initialization banner: CUDA Toolkit 12.9, Driver API 12.8
  • OS: Linux 6.17.0-40-generic, x86_64

Latest verification of the Newton contact reproducer:

  • Newton main: 7bb6d02d8eeab2cffc3adfa453ddd63799a2ac6a
  • Warp: 1.17.0.dev20260816
  • Same GPU, driver, CUDA Toolkit, and OS as above

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions