Skip to content

Commit f72e964

Browse files
Merge pull request #35 from stackav-oss/feature/jmanning/reshape-and-cache-floor-div
Convert to floor_divide
2 parents 5ca50bb + 253471d commit f72e964

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)