Files
pytorch/torch/nativert/kernels/CallTorchBindKernel.h
Dylan Maloy 81759afed4 [nativert] clean up some migration side-effects (#156919)
Summary: explicit torch::nativert namespace usage + // manual declarations

Test Plan:
ci

Rollback Plan:

Differential Revision: D77328855

Pull Request resolved: https://github.com/pytorch/pytorch/pull/156919
Approved by: https://github.com/zhxchen17
2025-06-26 20:28:32 +00:00

27 lines
619 B
C++

#pragma once
#include <c10/core/Device.h>
#include <torch/custom_class.h>
#include <torch/nativert/executor/ExecutionFrame.h>
#include <torch/nativert/executor/OpKernel.h>
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