Join NVML PCIe threads only if PCIe TX/RX is supported by GPU

This commit is contained in:
romner 2023-06-08 20:24:01 +02:00
parent be10989151
commit d8ebbe1181

View file

@ -1177,7 +1177,13 @@ namespace Gpu {
// nvTimer.stop_rename_reset("Nv pcie thread join");
//? Join PCIE TX/RX threads
pcie_tx_thread.join(); pcie_rx_thread.join();
if constexpr(is_init) { // there doesn't seem to be a better way to do this, but this should be fine considering it's just 2 lines
pcie_tx_thread.join();
pcie_rx_thread.join();
} else if (gpus_slice[i].supported_functions.pcie_txrx) {
pcie_tx_thread.join();
pcie_rx_thread.join();
}
}
return true;