Skip to content

Commit

Permalink
traceable
Browse files Browse the repository at this point in the history
  • Loading branch information
justinchuby committed Jul 22, 2024
1 parent c6f76e7 commit b7a8105
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions onnxscript/function_libs/torch_lib/ops/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -8145,33 +8145,33 @@ def aten_take_along_dim(
raise NotImplementedError()


@torch_op("aten::tan")
@torch_op("aten::tan", traceable=True)
def aten_tan(self: TFloat) -> TFloat:
"""tan(Tensor self) -> Tensor"""

return op.Tan(self)


@torch_op("aten::tanh")
@torch_op("aten::tanh", traceable=True)
def aten_tanh(self: TFloat) -> TFloat:
"""tanh(Tensor self) -> Tensor"""

return op.Tanh(self)


@torch_op("aten::tensor.bool")
@torch_op("aten::tensor.bool", traceable=True)
def aten_tensor_bool(self: bool, dtype: int) -> TensorType:
tensor = op.Constant(value_int=self)
return op.Cast(tensor, to=dtype)


@torch_op("aten::tensor.float")
@torch_op("aten::tensor.float", traceable=True)
def aten_tensor_float(self: float, dtype: int) -> TensorType:
tensor = op.Constant(value_float=self)
return op.Cast(tensor, to=dtype)


@torch_op("aten::tensor.int")
@torch_op("aten::tensor.int", traceable=True)
def aten_tensor_int(self: int, dtype: int) -> TensorType:
tensor = op.Constant(value_int=self)
return op.Cast(tensor, to=dtype)
Expand Down

0 comments on commit b7a8105

Please sign in to comment.