You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In sd_attention_torch.py, when q_tensor (same for k and v) is generated using torch.rand, the results of fused_self_attn_for_SD_small_head_size match the expected output from cpu_golden_attn. However, when generated using torch.randn, the computed results show a significant discrepancy.
In sd_attention_torch.py, replace q_tensor = torch.rand((4096, 64), dtype=torch.float32).to(device=device) with q_tensor = torch.randn((4096, 64), dtype=torch.float32).to(device=device). Do the same thing with k_tensor, v_tensor
Regression Issue
Select this option if this issue appears to be a regression.
Possible Solution
No response
Additional Information/Context
No response
neuronx-cc version used
aws_neuronx_venv_pytorch_2_5_nxd_inference
Framework(s) and their versions used (JAX, PyTorch, etc..)
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
In
sd_attention_torch.py
, whenq_tensor
(same fork
andv
) is generated usingtorch.rand
, the results offused_self_attn_for_SD_small_head_size
match the expected output fromcpu_golden_attn
. However, when generated usingtorch.randn
, the computed results show a significant discrepancy.Expected Behavior
Expected output - "NKI and Torch match"
Current Behavior
NKI and Torch differ
Reproduction Steps
In
sd_attention_torch.py
, replaceq_tensor = torch.rand((4096, 64), dtype=torch.float32).to(device=device)
withq_tensor = torch.randn((4096, 64), dtype=torch.float32).to(device=device)
. Do the same thing withk_tensor
,v_tensor
Regression Issue
Possible Solution
No response
Additional Information/Context
No response
neuronx-cc version used
aws_neuronx_venv_pytorch_2_5_nxd_inference
Framework(s) and their versions used (JAX, PyTorch, etc..)
No response
The text was updated successfully, but these errors were encountered: