Skip to content

Commit

Permalink
fix compile problem (#31850)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqiu authored Mar 24, 2021
1 parent 0279486 commit a934888
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions paddle/fluid/operators/npu_op_runner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ aclFormat ConvertToNpuFormat(DataLayout layout) {
}

aclrtStream GetCurrentNPUStream() {
int device_id = GetCurrentNPUDeviceId();
int device_id = platform::GetCurrentNPUDeviceId();
platform::DeviceContextPool &pool = platform::DeviceContextPool::Instance();
auto &dev_ctx = *pool.Get(platform::NPUPlace(device_id));
auto *dev_ctx = static_cast<platform::NPUDeviceContext *>(
pool.Get(platform::NPUPlace(device_id)));
return dev_ctx->stream();
}

Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/operators/npu_op_runner.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class NpuOpRunner {

std::vector<aclDataBuffer *> &GetOutputBuffers();

void Run(aclrtStream stream == nullptrr);
void Run(aclrtStream stream = nullptr);

private:
aclTensorDesc *CreateTensorDesc(Tensor tensor);
Expand Down

1 comment on commit a934888

@paddle-bot-old
Copy link

@paddle-bot-old paddle-bot-old bot commented on a934888 Mar 24, 2021

Choose a reason for hiding this comment

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

🕵️ CI failures summary

🔍PR: #31850 Commit ID: a934888 contains failed CI.

Please sign in to comment.