We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6b4496 commit 4f31055Copy full SHA for 4f31055
paddle/cinn/runtime/cuda/cinn_cuda_runtime_source.cuh
@@ -338,7 +338,7 @@ extern "C" {
338
339
__device__ inline int FN_INT32(pow)(int a, int b) {
340
if (a == 0 && b < 0) {
341
- return -1;
+ return 0;
342
}
343
float res = pow(__int2float_rd(a), __int2float_rd(b));
344
return __float2int_rn(res);
@@ -418,6 +418,9 @@ __device__ inline long long int FN_INT64(exp)(long long int a) {
418
419
__device__ inline long long int FN_INT64(pow)(long long int a,
420
long long int b) {
421
+ if (a == 0 && b < 0) {
422
423
+ }
424
double res = pow(__ll2double_rd(a), __ll2double_rd(b));
425
return __double2ll_rn(res);
426
0 commit comments