We have a new operator registration API introduced in #36258, and we need to port all use sites of the old registration API to use it.
Here is the general recipe for porting:
- We must add def()s of the operators to the centralized location. For
aten:: namespace, this location is the TORCH_LIBRARY(aten, m) { block in aten/src/ATen/templates/TypeDefault.cpp. A def looks like:
m.def("aten::splitlines(str self, bool keepends=False) -> str[]");
- We must translate the registrations in register_string_ops.cpp to the new registration form (staying in this file). You do this by adding a new
TORCH_LIBRARY_IMPL block as such:
TORCH_LIBRARY_IMPL(aten, CatchAll, m) {
m.impl("splitlines", [](std::string string, bool keepends) {
// previous implementation
});
// ... rest of the registrations ...
}
NB: This is the first time we're porting the JIT operators to the new API, so there may be unforeseen complications.
This task is reserved for bootcamp, please get in contact with me before starting work on it.
cc @suo
We have a new operator registration API introduced in #36258, and we need to port all use sites of the old registration API to use it.
Here is the general recipe for porting:
aten::namespace, this location is theTORCH_LIBRARY(aten, m) {block inaten/src/ATen/templates/TypeDefault.cpp. A def looks like:TORCH_LIBRARY_IMPLblock as such:NB: This is the first time we're porting the JIT operators to the new API, so there may be unforeseen complications.
This task is reserved for bootcamp, please get in contact with me before starting work on it.
cc @suo