We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5ca50bb + 253471d commit f72e964Copy full SHA for f72e964
1 file changed
conch/reference/vllm/reshape_and_cache.py
@@ -28,7 +28,7 @@ def _reshape_and_cache_pytorch_ref(
28
key = (key / k_scale).to(fp8_dtype).view(key_cache.dtype)
29
value = (value / v_scale).to(fp8_dtype).view(value_cache.dtype)
30
31
- block_indicies = torch.div(slot_mapping, block_size, rounding_mode="floor")
+ block_indicies = torch.floor_divide(slot_mapping, block_size)
32
block_offsets = slot_mapping % block_size
33
key_cache[block_indicies, block_offsets, :, :] = key[:num_tokens]
34
value_cache[block_indicies, block_offsets, :, :] = value[:num_tokens]
0 commit comments