// Optimized verification kernel fragment for AMD CDNA __global__ void verify_tokens_kernel( const float* draft_logits, const float* target_logits, int* accepted_count, float threshold) { int idx = blockIdx.x * blockDim.x + threadIdx.x; // Calculate rejection sampling criteria using ROCm vector intrinsics // Avoid branching to keep warps synchronized float p_draft = draft_logits[idx]; float p_target = target_logits[idx]; bool accept = (p_target >= p_draft) || (random_uniform() < (p_target / p_draft)); // Atomic operations to update the accepted token chain }