mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-23 22:13:38 +00:00
[TensorRT EP] Fix bug for using correct device id for EP allocator (#17036)
The code always uses device id 0. Fix to use provider option `device_id_`
This commit is contained in:
parent
50719d2f8e
commit
5b9bf8b663
1 changed files with 1 additions and 1 deletions
|
|
@ -2272,7 +2272,7 @@ common::Status TensorrtExecutionProvider::Compile(const std::vector<FusedNodeAnd
|
|||
std::unordered_set<std::string> input_names;
|
||||
std::unordered_map<std::string, std::vector<int32_t>> tensor_shape_values;
|
||||
|
||||
OrtMemoryInfo mem_info("", OrtAllocatorType::OrtDeviceAllocator, OrtDevice(OrtDevice::GPU, OrtDevice::MemType::DEFAULT, 0));
|
||||
OrtMemoryInfo mem_info("", OrtAllocatorType::OrtDeviceAllocator, OrtDevice(OrtDevice::GPU, OrtDevice::MemType::DEFAULT, device_id_), device_id_);
|
||||
if (alloc_ == nullptr) {
|
||||
Ort::ThrowOnError(api->KernelContext_GetAllocator(context, &mem_info, &alloc_));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue