AMD HIP backend for gfx1100 (PR #121, squashed onto its 0.1.21 base)
This commit is contained in:
1 parent
aaeb5a4120
commit
fa42f31dbd
47 files changed
+4807
-161
No files matched your search
@@ -73,9 +73,12 @@ bool RemoteExperts::preflight(int device, double& free_gib, std::string& err) {
|
||||
// The layer waits for this GPU on the CPU pool's critical path: spin instead of sleeping, whose wake-up
|
||||
// costs more than a small expert batch takes (measured: ~0.3 ms per round trip on Windows). Only possible
|
||||
// before the device's context exists, so first thing; STRATA_REMOTE_SPIN=0 keeps the driver's default.
|
||||
#if !defined(STRATA_USE_HIP)
|
||||
const char* spin = std::getenv("STRATA_REMOTE_SPIN");
|
||||
if (!(spin && spin[0] == '0')) cudaInitDevice(device, cudaDeviceScheduleSpin | cudaDeviceMapHost, 0);
|
||||
cudaGetLastError();
|
||||
#endif
|
||||
// HIP has no cudaInitDevice equivalent; retain its default scheduling policy.
|
||||
DeviceScope scope(device);
|
||||
if (!scope.ok) { err = scope.error(device); return false; }
|
||||
size_t free_bytes = 0, total_bytes = 0;
|
||||
|
||||
Reference in new issue
Block a user