File size: 343 Bytes
e52d1ec
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
#include "torch_binding.h"
#include "registration.h"
#include <torch/library.h>

TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, ops) {
  ops.def("get_position_ids(Tensor out, Tensor input_ids, Tensor "
          "image_grid_thw) -> ()");
  ops.impl("get_position_ids", torch::kCUDA, &get_position_ids);
}

REGISTER_EXTENSION(TORCH_EXTENSION_NAME)