From 0107e0c9a36838b48b40669f4fb7ee048989fc32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Mon, 18 May 2026 12:46:21 +0000 Subject: [PATCH 1/2] activation: fix signatures --- activation/torch-ext/activation/__init__.py | 22 ++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/activation/torch-ext/activation/__init__.py b/activation/torch-ext/activation/__init__.py index 1a9cd15a..cfce59ba 100644 --- a/activation/torch-ext/activation/__init__.py +++ b/activation/torch-ext/activation/__init__.py @@ -5,56 +5,56 @@ from . import layers -def silu_and_mul(out: torch.Tensor, x: torch.Tensor) -> None: +def silu_and_mul(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: ops.silu_and_mul(out, x) return out -def mul_and_silu(out: torch.Tensor, x: torch.Tensor) -> None: +def mul_and_silu(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: ops.mul_and_silu(out, x) return out -def gelu_and_mul(out: torch.Tensor, x: torch.Tensor) -> None: +def gelu_and_mul(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: ops.gelu_and_mul(out, x) return out -def gelu_tanh_and_mul(out: torch.Tensor, x: torch.Tensor) -> None: +def gelu_tanh_and_mul(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: ops.gelu_tanh_and_mul(out, x) return out -def fatrelu_and_mul(out: torch.Tensor, x: torch.Tensor, threshold: float = 0.0) -> None: +def fatrelu_and_mul(out: torch.Tensor, x: torch.Tensor, threshold: float = 0.0) -> torch.Tensor: ops.fatrelu_and_mul(out, x, threshold) return out -def gelu(out: torch.Tensor, x: torch.Tensor) -> None: +def gelu(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: ops.gelu(out, x) return out -def silu(out: torch.Tensor, x: torch.Tensor) -> None: +def silu(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: ops.silu(out, x) return out -def gelu_tanh(out: torch.Tensor, x: torch.Tensor) -> None: +def gelu_tanh(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: ops.gelu_tanh(out, x) return out -def gelu_fast(out: torch.Tensor, x: torch.Tensor) -> None: +def gelu_fast(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: ops.gelu_fast(out, x) return out -def gelu_new(out: torch.Tensor, x: torch.Tensor) -> None: +def gelu_new(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: ops.gelu_new(out, x) return out -def gelu_quick(out: torch.Tensor, x: torch.Tensor) -> None: +def gelu_quick(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: ops.gelu_quick(out, x) return out From 6bb669cbd84f12bf2f87ab4a78ec0773e58169ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Mon, 18 May 2026 12:46:55 +0000 Subject: [PATCH 2/2] activation: update flake --- activation/flake.lock | 7 +++---- activation/flake.nix | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/activation/flake.lock b/activation/flake.lock index 1413b98e..5603c235 100644 --- a/activation/flake.lock +++ b/activation/flake.lock @@ -41,16 +41,15 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1777901020, - "narHash": "sha256-m54hEdh1kK+pDcRfJDwN0P861X5VWpC/yZ1TjTwshtA=", + "lastModified": 1779099126, + "narHash": "sha256-pjHUA4mQ+Opm04nBTetc6+rEFSwtkL49e1nAy1APLcM=", "owner": "huggingface", "repo": "kernels", - "rev": "614c6bb2ee922a832852cb5562d5571cd9600a9c", + "rev": "f4cc83f0301c59f3647663d45357b76e3468244a", "type": "github" }, "original": { "owner": "huggingface", - "ref": "torch-2.12", "repo": "kernels", "type": "github" } diff --git a/activation/flake.nix b/activation/flake.nix index 5186161b..f8ee7ca9 100644 --- a/activation/flake.nix +++ b/activation/flake.nix @@ -2,7 +2,7 @@ description = "Flake for activation kernels"; inputs = { - kernel-builder.url = "github:huggingface/kernels/torch-2.12"; + kernel-builder.url = "github:huggingface/kernels"; }; outputs =