mirror of
https://github.com/ml-explore/mlx.git
synced 2025-08-23 05:47:46 +08:00
Fix warning 186-D from nvcc (#2527)
This commit is contained in:
parent
f93f87c802
commit
f6819a1f26
@ -205,8 +205,10 @@ struct Power {
|
|||||||
if constexpr (cuda::std::is_integral_v<T>) {
|
if constexpr (cuda::std::is_integral_v<T>) {
|
||||||
T res = 1;
|
T res = 1;
|
||||||
// Raising an integer to a negative power is undefined
|
// Raising an integer to a negative power is undefined
|
||||||
if (exp < 0) {
|
if constexpr (cuda::std::is_signed_v<T>) {
|
||||||
return 0;
|
if (exp < 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
while (exp) {
|
while (exp) {
|
||||||
if (exp & 1) {
|
if (exp & 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user