Skip to content

Commit 8eab21c

Browse files
committed
Code Review adjustments
1 parent 1ac5b2d commit 8eab21c

File tree

1 file changed

+4
-4
lines changed
  • offload/plugins-nextgen/amdgpu/src

1 file changed

+4
-4
lines changed

offload/plugins-nextgen/amdgpu/src/rtl.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ Error asyncMemCopy(bool UseMultipleSdmaEngines, void *Dst, hsa_agent_t DstAgent,
191191
}
192192

193193
Error getTargetTripleAndFeatures(hsa_agent_t Agent,
194-
SmallVector<StringRef> &Targets) {
194+
SmallVector<SmallString<32>> &Targets) {
195195
auto Err = hsa_utils::iterateAgentISAs(Agent, [&](hsa_isa_t ISA) {
196196
uint32_t Length;
197197
hsa_status_t Status;
@@ -1988,10 +1988,10 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
19881988
return Err;
19891989

19901990
// Detect if XNACK is enabled
1991-
SmallVector<StringRef> Targets;
1991+
SmallVector<SmallString<32>> Targets;
19921992
if (auto Err = hsa_utils::getTargetTripleAndFeatures(Agent, Targets))
19931993
return Err;
1994-
if (!Targets.empty() && Targets[0].contains("xnack+"))
1994+
if (!Targets.empty() && Targets[0].str().contains("xnack+"))
19951995
IsXnackEnabled = true;
19961996

19971997
// detect if device is an APU.
@@ -3205,7 +3205,7 @@ struct AMDGPUPluginTy final : public GenericPluginTy {
32053205
if (!Processor)
32063206
return false;
32073207

3208-
SmallVector<StringRef> Targets;
3208+
SmallVector<SmallString<32>> Targets;
32093209
if (auto Err = hsa_utils::getTargetTripleAndFeatures(
32103210
getKernelAgent(DeviceId), Targets))
32113211
return Err;

0 commit comments

Comments
 (0)