forked from ccf-ai-infra/GPUCodeForces
finish PATS #88
This commit is contained in:
parent
cb63208bbd
commit
5e0d773f74
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in New Issue