Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jerrrrry
infinicore
Commits
e9f08d05
Commit
e9f08d05
authored
Jun 04, 2025
by
crapromer
Browse files
chage from rd to rn in swiglu_maca_internal.h
parent
802a75d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/infiniop/ops/swiglu/maca/swiglu_maca_internal.h
src/infiniop/ops/swiglu/maca/swiglu_maca_internal.h
+2
-2
No files found.
src/infiniop/ops/swiglu/maca/swiglu_maca_internal.h
View file @
e9f08d05
...
@@ -14,7 +14,7 @@ private:
...
@@ -14,7 +14,7 @@ private:
}
else
if
constexpr
(
std
::
is_same_v
<
T
,
half
>
)
{
}
else
if
constexpr
(
std
::
is_same_v
<
T
,
half
>
)
{
return
hrcp
(
__hadd
(
half
(
1.
f
),
__float2half
(
__expf
(
__half2float
(
__hneg
(
x
))))));
return
hrcp
(
__hadd
(
half
(
1.
f
),
__float2half
(
__expf
(
__half2float
(
__hneg
(
x
))))));
}
else
if
constexpr
(
std
::
is_same_v
<
T
,
float
>
)
{
}
else
if
constexpr
(
std
::
is_same_v
<
T
,
float
>
)
{
return
__frcp_r
d
(
__fadd_r
d
(
1
,
__expf
(
-
x
)));
return
__frcp_r
n
(
__fadd_r
n
(
1
,
__expf
(
-
x
)));
}
else
{
}
else
{
return
1
/
(
1
+
std
::
exp
(
-
x
));
return
1
/
(
1
+
std
::
exp
(
-
x
));
}
}
...
@@ -29,7 +29,7 @@ public:
...
@@ -29,7 +29,7 @@ public:
}
else
if
constexpr
(
std
::
is_same_v
<
T
,
half
>
)
{
}
else
if
constexpr
(
std
::
is_same_v
<
T
,
half
>
)
{
return
__hmul
(
__hmul
(
gate
,
sigmoid
(
gate
)),
up
);
return
__hmul
(
__hmul
(
gate
,
sigmoid
(
gate
)),
up
);
}
else
if
constexpr
(
std
::
is_same_v
<
T
,
float
>
)
{
}
else
if
constexpr
(
std
::
is_same_v
<
T
,
float
>
)
{
return
__fmul_r
d
(
__fmul_r
d
(
gate
,
sigmoid
(
gate
)),
up
);
return
__fmul_r
n
(
__fmul_r
n
(
gate
,
sigmoid
(
gate
)),
up
);
}
else
{
}
else
{
return
gate
*
sigmoid
(
gate
)
*
up
;
return
gate
*
sigmoid
(
gate
)
*
up
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment