Skip to content

Commit 253471d

Browse files
Convert to floor_divide
1 parent 5ca50bb commit 253471d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

conch/reference/vllm/reshape_and_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def _reshape_and_cache_pytorch_ref(
2828
key = (key / k_scale).to(fp8_dtype).view(key_cache.dtype)
2929
value = (value / v_scale).to(fp8_dtype).view(value_cache.dtype)
3030

31-
block_indicies = torch.div(slot_mapping, block_size, rounding_mode="floor")
31+
block_indicies = torch.floor_divide(slot_mapping, block_size)
3232
block_offsets = slot_mapping % block_size
3333
key_cache[block_indicies, block_offsets, :, :] = key[:num_tokens]
3434
value_cache[block_indicies, block_offsets, :, :] = value[:num_tokens]

0 commit comments

Comments
 (0)