Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions mlir/test/lit.site.cfg.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,11 @@ config.features = None
if config.rocm_path:
try:
agents = get_agents()
config.arch = ','.join(agents)
for x in agents:
if not config.features:
config.features, config.arch_support_mfma, config.arch_support_wmma = get_arch_features(x)
config.substitutions.append(('%features', config.features))
if not config.arch:
if agents:
Copy link
Contributor

@justinrosner justinrosner Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know here is probably not the place to do this, but is there somewhere where we can emit a warning to the user that we are only using one of the available archs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what the best place for that is. This seems like it might make most sense to me:
https://github.com/ROCm/rocMLIR/blob/develop/mlir/test/common_utils/common.py#L58

config.arch = sorted(agents)[0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we sorting? let's imagine the user sets HIP_VISIBLE_DEVICES="1,0", I guess HIP will return gpu 1 first? we want to run on that device, right?

config.features, config.arch_support_mfma, config.arch_support_wmma = get_arch_features(config.arch)
config.substitutions.append(('%features', config.features))
else:
config.no_AMD_GPU = True
except subprocess.CalledProcessError:
config.no_AMD_GPU = True
Expand Down