Define Custom Operator based on CPP program
rwbfd opened this issue Β· comments
π Feature
Define Custom Operator based on a CPP program
Motivation
It is possible to define a custom-based CPP program or CUDA program as an operator. However, I am not entirely sure whether this can be done in PyTorch XLA.
If so, is it possible to create the code example with it? Or is it the same as defining a custom operator in PyTorch?
Can you be a bit more specified on what are you trying to do? There is a way to define a c++ op like
xla/torch_xla/csrc/aten_xla_type.cpp
Lines 896 to 902 in 53e5d1d
but you will either need a python binding to expose this op or you want to call this op directly from C++ somewhere.