cf245adff956d57c166f5652a164a881b3275f1c
CCCL source: catch2_test_device_copy_batched.cu CCCL pattern: DeviceCopy::Batched always uses separate src/dst buffers with shuffled destination offsets. Never does in-place scatter. Bug: _swap_mamba_cache used cache[:, [to,from]] = cache[:, [from,to]] PyTorch advanced indexing assignment has undefined evaluation order when src and dst overlap — this can corrupt DeltaNet conv_state and temporal_state during decode, causing silent numerical errors. Fix: explicit temp = clone(from), copy(to→from), copy(tmp→to). Three CUDA memcpy calls instead of one potentially-racy fancy index. This affects every decode step of every DeltaNet layer (alternating layers in Qwen3.6). Corrupt temporal_state → wrong attention output → garbage text or NaN propagation.
project_6
Description
Languages
C++
41.8%
Cuda
31.6%
Python
22.2%
C
2.1%
CMake
1.1%
Other
1.1%