torch_bindings.cpp 557 B

12345678910111213141516
  1. #include <torch/library.h>
  2. #include "scalar_type.hpp"
  3. #include "registration.h"
  4. // Note the CORE exstension will be built for (almost) all hardware targets so
  5. // new additions must account for this. (currently not built for TPU and Neuron)
  6. TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, lib) {
  7. // ScalarType, a custom class for representing data types that supports
  8. // quantized types, declared here so it can be used when creating interfaces
  9. // for custom ops.
  10. aphrodite::ScalarTypeTorch::bind_class(lib);
  11. }
  12. REGISTER_EXTENSION(TORCH_EXTENSION_NAME)