-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Open
Labels
module: custom-operatorscustom operators, custom ops, custom-operators, custom-opscustom operators, custom ops, custom-operators, custom-opsmodule: libraryRelated to torch.library (for registering ops from Python)Related to torch.library (for registering ops from Python)triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
Custom op support with 64+ arguments
Is there any plan to support 64+ argument? I have a custom kernel that takes 64+ arguments.
import torch
from torch.library import Library, impl, register_fake
num_args = 65
# Create a new custom namespace
my_lib = Library("my_ops", "LIB")
# Define a custom operator with a list of tensors as input
args = ", ".join([f"Tensor t{i}" for i in range(num_args)])
my_lib.define(f"a_func({args}) -> Tensor")
Traceback (most recent call last):
File "/test/torch_test.py", line 18, in <module>
my_lib.define(f"a_func({args}) -> Tensor")
File "/miniconda3/envs/test-venv/lib/python3.11/site-packages/torch/library.py", line 172, in define
result = self.m.define(schema, alias_analysis, tuple(tags))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: The function schema has 65 arguments but this PyTorch build only supports 64
Alternatives
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
module: custom-operatorscustom operators, custom ops, custom-operators, custom-opscustom operators, custom ops, custom-operators, custom-opsmodule: libraryRelated to torch.library (for registering ops from Python)Related to torch.library (for registering ops from Python)triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module