Instructions to use replicate/gpt-oss-metal-kernels with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use replicate/gpt-oss-metal-kernels 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/gpt-oss-metal-kernels", version=1) - Notebooks
- Google Colab
- Kaggle
Mohamed Mekkouri commited on
Commit ·
bf2ce7b
1
Parent(s): 7f87253
update
Browse files- build/torch28-metal-aarch64-darwin/gptoss_kernels/__pycache__/__init__.cpython-313.pyc +0 -0
- build/torch28-metal-aarch64-darwin/gptoss_kernels/__pycache__/_ops.cpython-313.pyc +0 -0
- build/torch28-metal-aarch64-darwin/gptoss_kernels/{_gptoss_kernels_c93d5eb_dirty.abi3.so → _gptoss_kernels_7f87253_dirty.abi3.so} +2 -2
- build/torch28-metal-aarch64-darwin/gptoss_kernels/_ops.py +3 -3
- build/torch29-metal-aarch64-darwin/gptoss_kernels/__pycache__/__init__.cpython-313.pyc +0 -0
- build/torch29-metal-aarch64-darwin/gptoss_kernels/__pycache__/_ops.cpython-313.pyc +0 -0
- build/torch29-metal-aarch64-darwin/gptoss_kernels/{_gptoss_kernels_c93d5eb_dirty.abi3.so → _gptoss_kernels_7f87253_dirty.abi3.so} +2 -2
- build/torch29-metal-aarch64-darwin/gptoss_kernels/_ops.py +3 -3
- gptoss_kernels/source/tensor_wrappers.cpp +0 -1
build/torch28-metal-aarch64-darwin/gptoss_kernels/__pycache__/__init__.cpython-313.pyc
CHANGED
|
Binary files a/build/torch28-metal-aarch64-darwin/gptoss_kernels/__pycache__/__init__.cpython-313.pyc and b/build/torch28-metal-aarch64-darwin/gptoss_kernels/__pycache__/__init__.cpython-313.pyc differ
|
|
|
build/torch28-metal-aarch64-darwin/gptoss_kernels/__pycache__/_ops.cpython-313.pyc
CHANGED
|
Binary files a/build/torch28-metal-aarch64-darwin/gptoss_kernels/__pycache__/_ops.cpython-313.pyc and b/build/torch28-metal-aarch64-darwin/gptoss_kernels/__pycache__/_ops.cpython-313.pyc differ
|
|
|
build/torch28-metal-aarch64-darwin/gptoss_kernels/{_gptoss_kernels_c93d5eb_dirty.abi3.so → _gptoss_kernels_7f87253_dirty.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e018e38aa94dfae2f05d57e4f666d5a3f26add864cd977ca5052f4ffa6aceb38
|
| 3 |
+
size 425432
|
build/torch28-metal-aarch64-darwin/gptoss_kernels/_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 _gptoss_kernels_7f87253_dirty
|
| 3 |
+
ops = torch.ops._gptoss_kernels_7f87253_dirty
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_gptoss_kernels_7f87253_dirty::{op_name}"
|
build/torch29-metal-aarch64-darwin/gptoss_kernels/__pycache__/__init__.cpython-313.pyc
CHANGED
|
Binary files a/build/torch29-metal-aarch64-darwin/gptoss_kernels/__pycache__/__init__.cpython-313.pyc and b/build/torch29-metal-aarch64-darwin/gptoss_kernels/__pycache__/__init__.cpython-313.pyc differ
|
|
|
build/torch29-metal-aarch64-darwin/gptoss_kernels/__pycache__/_ops.cpython-313.pyc
CHANGED
|
Binary files a/build/torch29-metal-aarch64-darwin/gptoss_kernels/__pycache__/_ops.cpython-313.pyc and b/build/torch29-metal-aarch64-darwin/gptoss_kernels/__pycache__/_ops.cpython-313.pyc differ
|
|
|
build/torch29-metal-aarch64-darwin/gptoss_kernels/{_gptoss_kernels_c93d5eb_dirty.abi3.so → _gptoss_kernels_7f87253_dirty.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1446e5adae835d61201c5d66dd701bc8dbb996c771474eb4ab7420cf03b32042
|
| 3 |
+
size 409960
|
build/torch29-metal-aarch64-darwin/gptoss_kernels/_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 _gptoss_kernels_7f87253_dirty
|
| 3 |
+
ops = torch.ops._gptoss_kernels_7f87253_dirty
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_gptoss_kernels_7f87253_dirty::{op_name}"
|
gptoss_kernels/source/tensor_wrappers.cpp
CHANGED
|
@@ -133,7 +133,6 @@ void run_metal_kernel(const char* kernel_symbol, EncodeFn&& encode_fn) {
|
|
| 133 |
"function_create failed");
|
| 134 |
stream = at::mps::getCurrentMPSStream();
|
| 135 |
if (stream != nullptr) {
|
| 136 |
-
stream->synchronize(at::mps::SyncType::COMMIT_AND_WAIT);
|
| 137 |
void* command_queue_obj = stream->commandQueue();
|
| 138 |
if (command_queue_obj != nullptr) {
|
| 139 |
TORCH_CHECK(
|
|
|
|
| 133 |
"function_create failed");
|
| 134 |
stream = at::mps::getCurrentMPSStream();
|
| 135 |
if (stream != nullptr) {
|
|
|
|
| 136 |
void* command_queue_obj = stream->commandQueue();
|
| 137 |
if (command_queue_obj != nullptr) {
|
| 138 |
TORCH_CHECK(
|