Block ROCm 4.1+ running against 4.0 and prior kfd.

Sramecc is misreported in kfd 4.0 and prior.  To prevent possible
corruption due to d16 instructions, deny use of gfx906 with older
kfds and correct misreport for gfx908.  Denial of gfx906 may be
overridden by setting HSA_IGNORE_SRAMECC_MISREPORT=1.

Change-Id: I7d5c3a716fad01c348f8b88cd508cedbf914c989
This commit is contained in:
Sean Keely
2021-03-10 13:59:31 -06:00
parent 72fa4a17fa
commit 45fbe5b192
4 changed files with 50 additions and 7 deletions
+7
View File
@@ -341,6 +341,10 @@ class Runtime {
uint64_t sys_clock_freq() const { return sys_clock_freq_; }
void KfdVersion(const HsaVersionInfo& version) { kfd_version = version; }
HsaVersionInfo KfdVersion() const { return kfd_version; }
protected:
static void AsyncEventsLoop(void*);
@@ -532,6 +536,9 @@ class Runtime {
// Pools KFD Events for InterruptSignal
InterruptSignal::EventPool EventPool;
// Kfd version
HsaVersionInfo kfd_version;
// Frees runtime memory when the runtime library is unloaded if safe to do so.
// Failure to release the runtime indicates an incorrect application but is
// common (example: calls library routines at process exit).