Files
pytorch/torch/nativert/kernels/CallTorchBindKernel.h
Jeddie Ji 4c59edf0c5 [nativert] Move call_torchbind_kernel (#156571)
Summary: Move call_torchbind_kernel target from internal sigmoid to pytorch

Test Plan:
Test Internally:

buck2 test mode/dev-nosan caffe2/test/cpp/nativert:op_kernel_test
buck build //sigmoid/core/kernels:kernel_factory
and all  sandcastle tests

Rollback Plan:

Differential Revision: D77118592

Pull Request resolved: https://github.com/pytorch/pytorch/pull/156571
Approved by: https://github.com/zhxchen17
2025-06-24 15:24:06 +00:00

27 lines
641 B
C++

#pragma once
#include <c10/core/Device.h>
#include <torch/custom_class.h>
#include <torch/nativert/executor/ExecutionFrame.h> // @manual
#include <torch/nativert/executor/OpKernel.h> // @manual
namespace torch::nativert {
class CallTorchBindKernel : public OpKernel {
public:
CallTorchBindKernel() = delete; // deleted default constructor
CallTorchBindKernel(const Node* node);
void computeInternal(ExecutionFrame& executionFrame) const override final;
private:
std::string methodName_;
torch::jit::Function* method_;
std::string customClassName_;
at::ClassTypePtr customClassType_;
};
} // namespace torch::nativert