Fix for the broken --config=rocm
build.
Note: This ia a different PR from #28189 (same symptom, different cause and fix)
The `--config=rocm` build was broken by the following commit.
9b1b3df00e
The changes made by the above commit were missing a couple of changes for the ROCm platform, whias was leading to the build failure. Adding those changes to make the `--config=rocm` build working again.
This commit is contained in:
parent
c38b41d7c8
commit
71791470c7
@ -180,9 +180,9 @@ port::StatusOr<DriverVersion> Diagnostician::FindDsoVersion() {
|
|||||||
}
|
}
|
||||||
string dso_version = dot + strlen(so_suffix);
|
string dso_version = dot + strlen(so_suffix);
|
||||||
// TODO(b/22689637): Eliminate the explicit namespace if possible.
|
// TODO(b/22689637): Eliminate the explicit namespace if possible.
|
||||||
string stripped_dso_version = absl::StripSuffix(dso_version, ".ld64");
|
auto stripped_dso_version = absl::StripSuffix(dso_version, ".ld64");
|
||||||
auto result = static_cast<port::StatusOr<DriverVersion>*>(data);
|
auto result = static_cast<port::StatusOr<DriverVersion>*>(data);
|
||||||
*result = rocm::StringToDriverVersion(stripped_dso_version);
|
*result = rocm::StringToDriverVersion(string(stripped_dso_version));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -210,8 +210,8 @@ port::StatusOr<DriverVersion> Diagnostician::FindKernelModuleVersion(
|
|||||||
size_t space_index = version_and_rest.find(" ");
|
size_t space_index = version_and_rest.find(" ");
|
||||||
auto kernel_version = version_and_rest.substr(0, space_index);
|
auto kernel_version = version_and_rest.substr(0, space_index);
|
||||||
// TODO(b/22689637): Eliminate the explicit namespace if possible.
|
// TODO(b/22689637): Eliminate the explicit namespace if possible.
|
||||||
string stripped_kernel_version = absl::StripSuffix(kernel_version, ".ld64");
|
auto stripped_kernel_version = absl::StripSuffix(kernel_version, ".ld64");
|
||||||
return rocm::StringToDriverVersion(stripped_kernel_version);
|
return rocm::StringToDriverVersion(string(stripped_kernel_version));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Diagnostician::WarnOnDsoKernelMismatch(
|
void Diagnostician::WarnOnDsoKernelMismatch(
|
||||||
|
Loading…
Reference in New Issue
Block a user