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

[Feature](mluOpKernels): access variable in tensor struct through function in kernels #1157

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/gen_case.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ std::string descToString(mluOpTensorDescriptor_t desc, char delimiter) {
tensor_info << " layout: " << mluop::getNameOfTensorLayout(layout)
<< delimiter;
tensor_info << " dtype: " << mluop::getNameOfDataType(dtype) << delimiter;
if (desc->pointer_mode == MLUOP_POINTER_MODE_HOST) {
if (desc->getPointerMode() == MLUOP_POINTER_MODE_HOST) {
tensor_info << " pointer_mode: POINTER_MODE_HOST" << delimiter;
if ((total_element_num != 1) || (dim != 0)) {
LOG(WARNING) << "[gen_case] Tensor has been set to POINTER_MODE_HOST, "
Expand Down
2 changes: 1 addition & 1 deletion core/gen_case.h
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ class PbNode {
uint64_t data_size = total_num * mluop::getSizeOfDataType(dtype);
void *data = malloc(data_size);
auto memcpy_dir =
(tensors[index].desc->pointer_mode == MLUOP_POINTER_MODE_HOST
(tensors[index].desc->getPointerMode() == MLUOP_POINTER_MODE_HOST
? cnrtMemcpyHostToHost
: cnrtMemcpyDevToHost);
if (cnrtSuccess == cnrtMemcpy(data,
Expand Down
Loading