2023-02-16 07:47:03 +00:00
|
|
|
#include <torch/extension.h>
|
|
|
|
|
|
|
|
void copy_blocks(
|
|
|
|
torch::Tensor& src,
|
|
|
|
torch::Tensor& dst,
|
|
|
|
const std::map<int64_t, int64_t>& block_mapping);
|
|
|
|
|
|
|
|
PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
|
|
|
|
m.def(
|
|
|
|
"copy_cache_blocks",
|
2023-02-16 09:24:42 +00:00
|
|
|
©_blocks,
|
2023-02-16 07:47:03 +00:00
|
|
|
"Copy the cache blocks from src to dst");
|
|
|
|
}
|