__init__.py 273 Bytes
Newer Older
wangkx1's avatar
init  
wangkx1 committed
1
2
3
4
5
6
7
8
9
10
11
12
13
# test_ops/__init__.py
import torch
from ._C import *

# 注册操作
def add_one(input):
    return torch.ops.test_ops.add_one(input)

def multiply_by_two(input):
    return torch.ops.test_ops.multiply_by_two(input)

# 导出函数
__all__ = ['add_one', 'multiply_by_two']