mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
Use compute queues by default in DML EP (#20438)
### Description We originally only use compute queues for compute-only devices; this change sets the default for DX12 devices to use compute queues as well. ### Motivation and Context There have been issues with TDRs occurring when using the current default queues, which doesn't happen on compute queues.
This commit is contained in:
parent
f78215adad
commit
dfd4bce36e
1 changed files with 5 additions and 1 deletions
|
|
@ -542,7 +542,11 @@ static D3D12_COMMAND_LIST_TYPE CalculateCommandListType(ID3D12Device* d3d12_devi
|
|||
sizeof(feature_levels)
|
||||
));
|
||||
|
||||
auto use_compute_command_list = (feature_levels.MaxSupportedFeatureLevel <= D3D_FEATURE_LEVEL_1_0_CORE);
|
||||
// Use compute queue whenever possible on supported hardware to avoid TDR and maintain UI QoS
|
||||
// Core and generic devices only have compute queues, DX11 has "immediate" submission, DX12 has both
|
||||
auto use_compute_command_list = (feature_levels.MaxSupportedFeatureLevel <= D3D_FEATURE_LEVEL_1_0_CORE) ||
|
||||
(feature_levels.MaxSupportedFeatureLevel >= D3D_FEATURE_LEVEL_12_0);
|
||||
|
||||
if (use_compute_command_list)
|
||||
{
|
||||
return D3D12_COMMAND_LIST_TYPE_COMPUTE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue