From 5e0d773f7467e5e837b104f077a718e3b20c8ffc Mon Sep 17 00:00:00 2001 From: hli28146 Date: Wed, 10 Dec 2025 14:43:28 +0800 Subject: [PATCH] finish PATS #88 --- S1/hli28146_#88/PATS_cuda.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/S1/hli28146_#88/PATS_cuda.py b/S1/hli28146_#88/PATS_cuda.py index 91335419..a0d1411f 100644 --- a/S1/hli28146_#88/PATS_cuda.py +++ b/S1/hli28146_#88/PATS_cuda.py @@ -22,7 +22,7 @@ struct __align__(16) Float4 { // PATS Logic __device__ __forceinline__ float compute_pats(float x, float k_pi) { - float sig = 1.0f / (1.0f + __expf(-x)); + float sig = 1.0f / (1.0f + expf(-x)); return x * atanf(k_pi * sig); } @@ -91,7 +91,7 @@ pats_op_module = load_inline( cuda_sources=cuda_source, functions=['pats_cuda_forward'], verbose=False, - extra_cuda_cflags=['-O3', '--use_fast_math'] + extra_cuda_cflags=['-O3'] ) class ModelNew(nn.Module):