interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

branch main Branches Tags History

CUDApp / evidence / AMD-GFX942-GDNCONV4 / reference-lines.txt

26 lines · 1186 bytes Raw Blame History
1URL https://raw.githubusercontent.com/huggingface/transformers/v5.8.0/src/transformers/models/qwen3_5/modeling_qwen3_5.py
2sha256 641da34484f6b9769e28615c680cc4e3202afbf5bdbf1da7d56d5a3d678918c7
3211: hidden_states,
4212: conv_state,
5213: weight,
6214: bias=None,
7215: activation=None,
8216:):
9217: _, hidden_size, seq_len = hidden_states.shape
10218: state_len = conv_state.shape[-1]
11219:
12220: hidden_states_new = torch.cat([conv_state, hidden_states], dim=-1).to(weight.dtype)
13221: conv_state.copy_(hidden_states_new[:, :, -state_len:])
14222: out = F.conv1d(hidden_states_new, weight.unsqueeze(1), bias, padding=0, groups=hidden_size)
15223: out = F.silu(out[:, :, -seq_len:])
16224: out = out.to(hidden_states.dtype)
17225: return out
18455: if use_precomputed_states and seq_len == 1:
19456: # Single-token cached decode: the fused per-step kernel updates the conv state in-place.
20457: mixed_qkv = self.causal_conv1d_update(
21458: mixed_qkv,
22459: conv_state,
23460: self.conv1d.weight.squeeze(1),
24461: self.conv1d.bias,
25462: self.activation,
26463: )