Commit 6892a7f5 authored by xgqdut2016's avatar xgqdut2016 Committed by zhangyue
Browse files

issue/436: support kunlun rope U32

parent badccb86
...@@ -169,7 +169,22 @@ infiniStatus_t Descriptor::calculate( ...@@ -169,7 +169,22 @@ infiniStatus_t Descriptor::calculate(
default: default:
return INFINI_STATUS_BAD_TENSOR_DTYPE; return INFINI_STATUS_BAD_TENSOR_DTYPE;
} }
} else { } else if (_info.pos_type == INFINI_DTYPE_U32) {
switch (_info.data_type) {
case INFINI_DTYPE_F32:
LAUNCH_KERNEL(float, uint32_t);
return INFINI_STATUS_SUCCESS;
case INFINI_DTYPE_F16:
LAUNCH_KERNEL(half, uint32_t);
return INFINI_STATUS_SUCCESS;
case INFINI_DTYPE_BF16:
LAUNCH_KERNEL(bfloat16_t, uint32_t);
return INFINI_STATUS_SUCCESS;
default:
return INFINI_STATUS_BAD_TENSOR_DTYPE;
}
}
else {
return INFINI_STATUS_BAD_TENSOR_DTYPE; return INFINI_STATUS_BAD_TENSOR_DTYPE;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment