fix compile problem (#31850)

ascendrc
Leo Chen 5 years ago committed by GitHub
parent 0279486b02
commit a93488839d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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();
}

@ -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);

Loading…
Cancel
Save