This is an archive of the discontinued LLVM Phabricator instance.

Reland rG4fcd1a8e6528:[llvm-exegesis] Add option to check the hardware support for a given feature before benchmarking.
ClosedPublic

Authored by oontvoo on Oct 1 2020, 9:17 AM.

Details

Summary

This is mostly for the benefit of the LBR latency mode.
Right now, it performs no checking. If this is run on non-supported hardware, it will produce all zeroes for latency.

Differential Revision: https://reviews.llvm.org/D85254

New change: Updated lit.local.cfg to use pass the right argument to llvm-exegesis to actually request the LBR mode.

Diff Detail

Event Timeline

oontvoo created this revision.Oct 1 2020, 9:17 AM
oontvoo requested review of this revision.Oct 1 2020, 9:17 AM
oontvoo accepted this revision.Oct 1 2020, 9:18 AM
This revision is now accepted and ready to land.Oct 1 2020, 9:18 AM
This revision was landed with ongoing or failed builds.Oct 1 2020, 9:22 AM
This revision was automatically updated to reflect the committed changes.
chfast added a subscriber: chfast.Jan 20 2022, 8:36 AM
chfast added inline comments.
llvm/test/tools/llvm-exegesis/X86/lbr/lit.local.cfg
21

This may be unrelated to this particular change, but this script hangs llvm-lit initialization. I'm using Python 3.9.

/llvm-project/llvm/utils/lit/lit/TestingConfig.py:103: fatal: unable to parse config file 'llvm-project/llvm/test/tools/llvm-exegesis/X86/lbr/lit.local.cfg', traceback: Traceback (most recent call last):
  File "llvm-project/llvm/utils/lit/lit/TestingConfig.py", line 92, in load_from_path
    exec(compile(data, path, 'exec'), cfg_globals, None)
  File "llvm-project/llvm/test/tools/llvm-exegesis/X86/lbr/lit.local.cfg", line 21, in <module>
    check_llvm_exegesis_latency_result = subprocess.call(
  File "/usr/lib/python3.9/subprocess.py", line 351, in call
    return p.wait(timeout=timeout)
  File "/usr/lib/python3.9/subprocess.py", line 1189, in wait
    return self._wait(timeout=timeout)
  File "/usr/lib/python3.9/subprocess.py", line 1917, in _wait
    (pid, sts) = self._try_wait(0)
  File "/usr/lib/python3.9/subprocess.py", line 1875, in _try_wait
    (pid, sts) = os.waitpid(self.pid, wait_flags)
KeyboardInterrupt