Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions python/infinicore/ops/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ def add(input, other, *, out=None):
return Tensor(_infinicore.add(input._underlying, other._underlying))

_infinicore.add_(out._underlying, input._underlying, other._underlying)

return out
2 changes: 2 additions & 0 deletions python/infinicore/ops/attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ def attention(q, k, v, k_cache, v_cache, pos, *, out=None):
v_cache._underlying,
pos,
)

return out
2 changes: 2 additions & 0 deletions python/infinicore/ops/causal_softmax.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ def causal_softmax(input, *, out=None):
return Tensor(_infinicore.causal_softmax(input._underlying))

_infinicore.causal_softmax_(out._underlying, input._underlying)

return out
2 changes: 2 additions & 0 deletions python/infinicore/ops/matmul.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ def matmul(input, other, *, out=None):
return Tensor(_infinicore.matmul(input._underlying, other._underlying))

_infinicore.matmul_(out._underlying, input._underlying, other._underlying)

return out
2 changes: 2 additions & 0 deletions python/infinicore/ops/rearrange.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ def rearrange(input, other, *, out=None):
return Tensor(_infinicore.rearrange(input._underlying))

_infinicore.rearrange_(out._underlying, input._underlying)

return out
2 changes: 2 additions & 0 deletions python/infinicore/ops/rms_norm.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ def rms_norm(input, weight, epsilon=1e-5, *, out=None):
_infinicore.rms_norm_(
out._underlying, input._underlying, weight._underlying, epsilon
)

return out
2 changes: 2 additions & 0 deletions python/infinicore/ops/silu.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ def silu(input, *, out=None):
return Tensor(_infinicore.silu(input._underlying))

_infinicore.silu_(out._underlying, input._underlying)

return out
2 changes: 2 additions & 0 deletions python/infinicore/ops/swiglu.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ def swiglu(input, other, *, out=None):
return Tensor(_infinicore.swiglu(input._underlying, other._underlying))

_infinicore.swiglu_(out._underlying, input._underlying, other._underlying)

return out
5 changes: 0 additions & 5 deletions test/infinicore/framework/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# [file name]: __init__.py
# [file content begin]
from .base import TestConfig, TestRunner, TestCase, BaseOperatorTest
from .tensor import TensorSpec, TensorInitializer
from .utils import (
Expand All @@ -16,7 +14,6 @@
from .devices import InfiniDeviceEnum, InfiniDeviceNames, torch_device_map
from .datatypes import to_torch_dtype, to_infinicore_dtype
from .runner import GenericTestRunner
from .templates import BinaryOperatorTest, UnaryOperatorTest

__all__ = [
"TensorSpec",
Expand All @@ -41,6 +38,4 @@
"to_torch_dtype",
"to_infinicore_dtype",
"GenericTestRunner",
"BinaryOperatorTest",
"UnaryOperatorTest",
]
Loading