Instructions to use replicate/relu with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use replicate/relu with Kernels:
# !pip install kernels from kernels import get_kernel # a version (or an explicit revision) is required; see the "Files and versions" tab for the available ones kernel = get_kernel("replicate/relu", version=1) - Notebooks
- Google Colab
- Kaggle
Build uploaded using `kernels`.
Browse files- .gitattributes +14 -0
- build/torch210-cxx11-cpu-x86_64-linux/__init__.py +12 -0
- build/torch210-cxx11-cpu-x86_64-linux/_ops.py +9 -0
- build/torch210-cxx11-cpu-x86_64-linux/_relu_2b7ea88.abi3.so +3 -0
- build/torch210-cxx11-cpu-x86_64-linux/metadata.json +4 -0
- build/torch210-cxx11-cpu-x86_64-linux/relu/__init__.py +26 -0
- build/torch210-cxx11-cu126-x86_64-linux/_ops.py +3 -3
- build/torch210-cxx11-cu126-x86_64-linux/{_relu_ff7d195.abi3.so → _relu_2b7ea88.abi3.so} +1 -1
- build/torch210-cxx11-cu128-x86_64-linux/_ops.py +3 -3
- build/torch210-cxx11-cu128-x86_64-linux/{_relu_ff7d195.abi3.so → _relu_2b7ea88.abi3.so} +1 -1
- build/torch210-cxx11-cu130-x86_64-linux/_ops.py +3 -3
- build/torch210-cxx11-cu130-x86_64-linux/{_relu_ff7d195.abi3.so → _relu_2b7ea88.abi3.so} +1 -1
- build/torch210-cxx11-rocm70-x86_64-linux/_ops.py +3 -3
- build/torch210-cxx11-rocm70-x86_64-linux/{_relu_ff7d195.abi3.so → _relu_2b7ea88.abi3.so} +1 -1
- build/torch210-cxx11-rocm71-x86_64-linux/_ops.py +3 -3
- build/torch210-cxx11-rocm71-x86_64-linux/{_relu_ff7d195.abi3.so → _relu_2b7ea88.abi3.so} +1 -1
- build/torch210-cxx11-xpu20253-x86_64-linux/_ops.py +3 -3
- build/torch210-cxx11-xpu20253-x86_64-linux/_relu_2b7ea88.abi3.so +3 -0
- build/torch210-cxx11-xpu20253-x86_64-linux/_relu_ff7d195.abi3.so +0 -3
- build/torch29-cxx11-cpu-x86_64-linux/__init__.py +12 -0
- build/torch29-cxx11-cpu-x86_64-linux/_ops.py +9 -0
- build/torch29-cxx11-cpu-x86_64-linux/_relu_2b7ea88.abi3.so +3 -0
- build/torch29-cxx11-cpu-x86_64-linux/metadata.json +4 -0
- build/torch29-cxx11-cpu-x86_64-linux/relu/__init__.py +26 -0
- build/torch29-cxx11-cu126-x86_64-linux/_ops.py +3 -3
- build/torch29-cxx11-cu126-x86_64-linux/{_relu_ff7d195.abi3.so → _relu_2b7ea88.abi3.so} +1 -1
- build/torch29-cxx11-cu128-x86_64-linux/_ops.py +3 -3
- build/torch29-cxx11-cu128-x86_64-linux/{_relu_ff7d195.abi3.so → _relu_2b7ea88.abi3.so} +1 -1
- build/torch29-cxx11-cu130-x86_64-linux/_ops.py +3 -3
- build/torch29-cxx11-cu130-x86_64-linux/{_relu_ff7d195.abi3.so → _relu_2b7ea88.abi3.so} +1 -1
- build/torch29-cxx11-rocm63-x86_64-linux/_ops.py +3 -3
- build/torch29-cxx11-rocm63-x86_64-linux/{_relu_ff7d195.abi3.so → _relu_2b7ea88.abi3.so} +1 -1
- build/torch29-cxx11-rocm64-x86_64-linux/_ops.py +3 -3
- build/torch29-cxx11-rocm64-x86_64-linux/{_relu_ff7d195.abi3.so → _relu_2b7ea88.abi3.so} +1 -1
- build/torch29-cxx11-xpu20252-x86_64-linux/_ops.py +3 -3
- build/torch29-cxx11-xpu20252-x86_64-linux/_relu_2b7ea88.abi3.so +3 -0
- build/torch29-cxx11-xpu20252-x86_64-linux/_relu_ff7d195.abi3.so +0 -3
.gitattributes
CHANGED
|
@@ -212,3 +212,17 @@ build/torch29-cxx11-rocm64-x86_64-linux/_relu_ff7d195.abi3.so filter=lfs diff=lf
|
|
| 212 |
build/torch29-cxx11-xpu20252-x86_64-linux/_relu_ff7d195.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 213 |
build/torch210-xpu20253-x86_64-windows/relu/_relu_d7b860a.pyd filter=lfs diff=lfs merge=lfs -text
|
| 214 |
build/torch210-metal-aarch64-darwin/_relu_2b7ea88.abi3.so filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 212 |
build/torch29-cxx11-xpu20252-x86_64-linux/_relu_ff7d195.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 213 |
build/torch210-xpu20253-x86_64-windows/relu/_relu_d7b860a.pyd filter=lfs diff=lfs merge=lfs -text
|
| 214 |
build/torch210-metal-aarch64-darwin/_relu_2b7ea88.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 215 |
+
build/torch210-cxx11-cpu-x86_64-linux/_relu_2b7ea88.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 216 |
+
build/torch210-cxx11-cu126-x86_64-linux/_relu_2b7ea88.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 217 |
+
build/torch210-cxx11-cu128-x86_64-linux/_relu_2b7ea88.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 218 |
+
build/torch210-cxx11-cu130-x86_64-linux/_relu_2b7ea88.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 219 |
+
build/torch210-cxx11-rocm70-x86_64-linux/_relu_2b7ea88.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 220 |
+
build/torch210-cxx11-rocm71-x86_64-linux/_relu_2b7ea88.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 221 |
+
build/torch210-cxx11-xpu20253-x86_64-linux/_relu_2b7ea88.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 222 |
+
build/torch29-cxx11-cpu-x86_64-linux/_relu_2b7ea88.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 223 |
+
build/torch29-cxx11-cu126-x86_64-linux/_relu_2b7ea88.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 224 |
+
build/torch29-cxx11-cu128-x86_64-linux/_relu_2b7ea88.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 225 |
+
build/torch29-cxx11-cu130-x86_64-linux/_relu_2b7ea88.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 226 |
+
build/torch29-cxx11-rocm63-x86_64-linux/_relu_2b7ea88.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 227 |
+
build/torch29-cxx11-rocm64-x86_64-linux/_relu_2b7ea88.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 228 |
+
build/torch29-cxx11-xpu20252-x86_64-linux/_relu_2b7ea88.abi3.so filter=lfs diff=lfs merge=lfs -text
|
build/torch210-cxx11-cpu-x86_64-linux/__init__.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Optional
|
| 2 |
+
|
| 3 |
+
import torch
|
| 4 |
+
|
| 5 |
+
from ._ops import ops
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
def relu(x: torch.Tensor, out: Optional[torch.Tensor] = None) -> torch.Tensor:
|
| 9 |
+
if out is None:
|
| 10 |
+
out = torch.empty_like(x)
|
| 11 |
+
ops.relu(out, x)
|
| 12 |
+
return out
|
build/torch210-cxx11-cpu-x86_64-linux/_ops.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
from . import _relu_2b7ea88
|
| 3 |
+
ops = torch.ops._relu_2b7ea88
|
| 4 |
+
|
| 5 |
+
def add_op_namespace_prefix(op_name: str):
|
| 6 |
+
"""
|
| 7 |
+
Prefix op by namespace.
|
| 8 |
+
"""
|
| 9 |
+
return f"_relu_2b7ea88::{op_name}"
|
build/torch210-cxx11-cpu-x86_64-linux/_relu_2b7ea88.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6272e95c975237644dc92d23a4aeceeee2d36985a3ecd37e6ee53eaf92563e08
|
| 3 |
+
size 1778072
|
build/torch210-cxx11-cpu-x86_64-linux/metadata.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"version": 1,
|
| 3 |
+
"python-depends": []
|
| 4 |
+
}
|
build/torch210-cxx11-cpu-x86_64-linux/relu/__init__.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import ctypes
|
| 2 |
+
import sys
|
| 3 |
+
|
| 4 |
+
import importlib
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
from types import ModuleType
|
| 7 |
+
|
| 8 |
+
def _import_from_path(file_path: Path) -> ModuleType:
|
| 9 |
+
# We cannot use the module name as-is, after adding it to `sys.modules`,
|
| 10 |
+
# it would also be used for other imports. So, we make a module name that
|
| 11 |
+
# depends on the path for it to be unique using the hex-encoded hash of
|
| 12 |
+
# the path.
|
| 13 |
+
path_hash = "{:x}".format(ctypes.c_size_t(hash(file_path.absolute())).value)
|
| 14 |
+
module_name = path_hash
|
| 15 |
+
spec = importlib.util.spec_from_file_location(module_name, file_path)
|
| 16 |
+
if spec is None:
|
| 17 |
+
raise ImportError(f"Cannot load spec for {module_name} from {file_path}")
|
| 18 |
+
module = importlib.util.module_from_spec(spec)
|
| 19 |
+
if module is None:
|
| 20 |
+
raise ImportError(f"Cannot load module {module_name} from spec")
|
| 21 |
+
sys.modules[module_name] = module
|
| 22 |
+
spec.loader.exec_module(module) # type: ignore
|
| 23 |
+
return module
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
globals().update(vars(_import_from_path(Path(__file__).parent.parent / "__init__.py")))
|
build/torch210-cxx11-cu126-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _relu_2b7ea88
|
| 3 |
+
ops = torch.ops._relu_2b7ea88
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_relu_2b7ea88::{op_name}"
|
build/torch210-cxx11-cu126-x86_64-linux/{_relu_ff7d195.abi3.so → _relu_2b7ea88.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2019872
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d7422e0920d61e84a22d9022762314b7747950bb41e8dc638b45ebdbe9d4b11f
|
| 3 |
size 2019872
|
build/torch210-cxx11-cu128-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _relu_2b7ea88
|
| 3 |
+
ops = torch.ops._relu_2b7ea88
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_relu_2b7ea88::{op_name}"
|
build/torch210-cxx11-cu128-x86_64-linux/{_relu_ff7d195.abi3.so → _relu_2b7ea88.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2111824
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3bdd87605f2d709f5d3560db499431570e99656909be2310e698fe8f9c52bdb5
|
| 3 |
size 2111824
|
build/torch210-cxx11-cu130-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _relu_2b7ea88
|
| 3 |
+
ops = torch.ops._relu_2b7ea88
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_relu_2b7ea88::{op_name}"
|
build/torch210-cxx11-cu130-x86_64-linux/{_relu_ff7d195.abi3.so → _relu_2b7ea88.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2129640
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1f3972f7be25c9b1c474c54b6e562223b8887f80bc92ef8b7679424e7bb97de7
|
| 3 |
size 2129640
|
build/torch210-cxx11-rocm70-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _relu_2b7ea88
|
| 3 |
+
ops = torch.ops._relu_2b7ea88
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_relu_2b7ea88::{op_name}"
|
build/torch210-cxx11-rocm70-x86_64-linux/{_relu_ff7d195.abi3.so → _relu_2b7ea88.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1990320
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:429f159e3be26c8efdcd18228837eb7bfab7a02fbaaf64c7f6bde2cd3d6aa349
|
| 3 |
size 1990320
|
build/torch210-cxx11-rocm71-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _relu_2b7ea88
|
| 3 |
+
ops = torch.ops._relu_2b7ea88
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_relu_2b7ea88::{op_name}"
|
build/torch210-cxx11-rocm71-x86_64-linux/{_relu_ff7d195.abi3.so → _relu_2b7ea88.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1990224
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b67c1d4412a4700003991adcb45d33f58b5315f928bb48a4f06106eb69fed8e6
|
| 3 |
size 1990224
|
build/torch210-cxx11-xpu20253-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _relu_2b7ea88
|
| 3 |
+
ops = torch.ops._relu_2b7ea88
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_relu_2b7ea88::{op_name}"
|
build/torch210-cxx11-xpu20253-x86_64-linux/_relu_2b7ea88.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b9ee73229934f2d58ce04f02e708bfdfda94bf68361faef9e119a4e9eed0b4e2
|
| 3 |
+
size 2050440
|
build/torch210-cxx11-xpu20253-x86_64-linux/_relu_ff7d195.abi3.so
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:1bba3cdf24bba6139d3eee4b958fd2f01659e5bcb6c7b90d8e0eaf74f4337620
|
| 3 |
-
size 2038664
|
|
|
|
|
|
|
|
|
|
|
|
build/torch29-cxx11-cpu-x86_64-linux/__init__.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Optional
|
| 2 |
+
|
| 3 |
+
import torch
|
| 4 |
+
|
| 5 |
+
from ._ops import ops
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
def relu(x: torch.Tensor, out: Optional[torch.Tensor] = None) -> torch.Tensor:
|
| 9 |
+
if out is None:
|
| 10 |
+
out = torch.empty_like(x)
|
| 11 |
+
ops.relu(out, x)
|
| 12 |
+
return out
|
build/torch29-cxx11-cpu-x86_64-linux/_ops.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
from . import _relu_2b7ea88
|
| 3 |
+
ops = torch.ops._relu_2b7ea88
|
| 4 |
+
|
| 5 |
+
def add_op_namespace_prefix(op_name: str):
|
| 6 |
+
"""
|
| 7 |
+
Prefix op by namespace.
|
| 8 |
+
"""
|
| 9 |
+
return f"_relu_2b7ea88::{op_name}"
|
build/torch29-cxx11-cpu-x86_64-linux/_relu_2b7ea88.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:185566d5e900edd548cba65ab5f1934657e59c5335509a0b5ff0e7cc4b24951b
|
| 3 |
+
size 311600
|
build/torch29-cxx11-cpu-x86_64-linux/metadata.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"version": 1,
|
| 3 |
+
"python-depends": []
|
| 4 |
+
}
|
build/torch29-cxx11-cpu-x86_64-linux/relu/__init__.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import ctypes
|
| 2 |
+
import sys
|
| 3 |
+
|
| 4 |
+
import importlib
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
from types import ModuleType
|
| 7 |
+
|
| 8 |
+
def _import_from_path(file_path: Path) -> ModuleType:
|
| 9 |
+
# We cannot use the module name as-is, after adding it to `sys.modules`,
|
| 10 |
+
# it would also be used for other imports. So, we make a module name that
|
| 11 |
+
# depends on the path for it to be unique using the hex-encoded hash of
|
| 12 |
+
# the path.
|
| 13 |
+
path_hash = "{:x}".format(ctypes.c_size_t(hash(file_path.absolute())).value)
|
| 14 |
+
module_name = path_hash
|
| 15 |
+
spec = importlib.util.spec_from_file_location(module_name, file_path)
|
| 16 |
+
if spec is None:
|
| 17 |
+
raise ImportError(f"Cannot load spec for {module_name} from {file_path}")
|
| 18 |
+
module = importlib.util.module_from_spec(spec)
|
| 19 |
+
if module is None:
|
| 20 |
+
raise ImportError(f"Cannot load module {module_name} from spec")
|
| 21 |
+
sys.modules[module_name] = module
|
| 22 |
+
spec.loader.exec_module(module) # type: ignore
|
| 23 |
+
return module
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
globals().update(vars(_import_from_path(Path(__file__).parent.parent / "__init__.py")))
|
build/torch29-cxx11-cu126-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _relu_2b7ea88
|
| 3 |
+
ops = torch.ops._relu_2b7ea88
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_relu_2b7ea88::{op_name}"
|
build/torch29-cxx11-cu126-x86_64-linux/{_relu_ff7d195.abi3.so → _relu_2b7ea88.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2014176
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2a904c83684ff26ccb29196c7d86f130ec5af243718dbfbc18a39163ebf4cd5e
|
| 3 |
size 2014176
|
build/torch29-cxx11-cu128-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _relu_2b7ea88
|
| 3 |
+
ops = torch.ops._relu_2b7ea88
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_relu_2b7ea88::{op_name}"
|
build/torch29-cxx11-cu128-x86_64-linux/{_relu_ff7d195.abi3.so → _relu_2b7ea88.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2101904
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a0d4f189021f5c2695da30cf3f16b8a1a49a8fea090f02b7da1afe42369dbd5c
|
| 3 |
size 2101904
|
build/torch29-cxx11-cu130-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _relu_2b7ea88
|
| 3 |
+
ops = torch.ops._relu_2b7ea88
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_relu_2b7ea88::{op_name}"
|
build/torch29-cxx11-cu130-x86_64-linux/{_relu_ff7d195.abi3.so → _relu_2b7ea88.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2127912
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:10e830172db6692a4e2bbdfef1d39a393ca5c819e65730b8ea267648b324d092
|
| 3 |
size 2127912
|
build/torch29-cxx11-rocm63-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _relu_2b7ea88
|
| 3 |
+
ops = torch.ops._relu_2b7ea88
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_relu_2b7ea88::{op_name}"
|
build/torch29-cxx11-rocm63-x86_64-linux/{_relu_ff7d195.abi3.so → _relu_2b7ea88.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1970448
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:11f983d1c272a89f012a2d0c09962d1d0c1964d766b27b43794a6240d5d4a4ae
|
| 3 |
size 1970448
|
build/torch29-cxx11-rocm64-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _relu_2b7ea88
|
| 3 |
+
ops = torch.ops._relu_2b7ea88
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_relu_2b7ea88::{op_name}"
|
build/torch29-cxx11-rocm64-x86_64-linux/{_relu_ff7d195.abi3.so → _relu_2b7ea88.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1989224
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a360df2b6366d89d51bc9a8975d30630b7f641fdebcfb2dc5e7eb5065875457a
|
| 3 |
size 1989224
|
build/torch29-cxx11-xpu20252-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _relu_2b7ea88
|
| 3 |
+
ops = torch.ops._relu_2b7ea88
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_relu_2b7ea88::{op_name}"
|
build/torch29-cxx11-xpu20252-x86_64-linux/_relu_2b7ea88.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a60f19a5f3144a81ba4929f01812372e2bb3117de056c7f4ff34c4449c5754df
|
| 3 |
+
size 2048320
|
build/torch29-cxx11-xpu20252-x86_64-linux/_relu_ff7d195.abi3.so
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:8f40df591dcd3b632bdfe87bed2b6e58de6e89e4548a7f8381404d82b1f31a8e
|
| 3 |
-
size 2037136
|
|
|
|
|
|
|
|
|
|
|
|