Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NPU] add pointer conversion to aclTensor #1476

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

TBD1
Copy link
Contributor

@TBD1 TBD1 commented Nov 21, 2024

目前aclnn接口调用EXEC_NPU_CMD中,ConvertTpye只支持DenseTensor等参数向aclTensor的转换,而不支持指针数据转换。
现增加phi::float16和int8_t向aclTensor的转换

Copy link

paddle-bot bot commented Nov 21, 2024

Thanks for your contribution!

// Ptr ConvertType to aclTensor
static const auto aclCreateTensor = GET_OP_API_FUNC(aclCreateTensor);
if (aclCreateTensor == nullptr) {
return nullptr;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

返回nullptr的可以抛个warning,感觉会好些

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants