TORCH_LIBRARY_FRAGMENT(atb, m)
m.impl(...)
torch.ops.atb
at_npu::native::atb
torch_npu
torchnpugen/gen_atb_ops.py
::atb::*
m.def(...)
op_plugin/config/atb_ops.yaml
cpp_name -> impl_name
op_plugin/include/AtbOpsInterface.h
op_plugin/ops/atb/AtbOpsInterface.cpp
op_plugin/ops/atb/*.cpp
cpp_name
at_npu::native::atb::
torchnpugen/templates/AtbOpsInterface.h
AtbOpsInterface.cpp
string.Template
namespace at_npu::native::atb
op_plugin/include/atb_ops.h
AtbOpsInterface.h
gen_atb_ops.py
_npu_group_topk
libop_plugin_atb.so
at_npu::native::atb::*
python -m torchnpugen.gen_atb_ops --config op_plugin/config/atb_ops.yaml --header op_plugin/include/AtbOpsInterface.h --source op_plugin/ops/atb/AtbOpsInterface.cpp --atb-src-dir op_plugin/ops/atb
python test/check_atb_cpp_api_contract.py --check-source
cpp_name -> impl_name -> m.impl -> m.def
atb_ops.yaml
op-plugin