[mlir][mlir-rocm-runner] Detect HIP version and AMD ISA version.
authorWen-Heng (Jack) Chung <whchung@gmail.com>
Fri, 5 Jun 2020 21:26:57 +0000 (16:26 -0500)
committerWen-Heng (Jack) Chung <whchung@gmail.com>
Sat, 6 Jun 2020 03:15:23 +0000 (22:15 -0500)
commit47073ccd4e78e33ec3d21ac2b2809ea8e193655a
tree566a4dcf7e9ae5a081e3a3a3ff6417d64a07dfcb
parent473220c4df7fcb5e5079b2f20f771bb02d0f19d8
[mlir][mlir-rocm-runner] Detect HIP version and AMD ISA version.

Summary:
Prior to ROCm / HIP 3.5, HSA code object V2 is the default binary format.
Starting from ROCm 3.5, HSA code object V3 becomes default.

Also invoke `rocm_agent_enumerator` to detect proper AMD ISA version on the
system. Use `gfx900` as the fallback value.

Reviewers: jerryyin yaxunl

Subscribers: mgorny, yaxunl, mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, stephenneuendorffer, Joonsoo, grosul1, frgossen, Kayjukh, jurahul, msifontes

Tags: #mlir

Differential Revision: https://reviews.llvm.org/D81309
mlir/tools/mlir-rocm-runner/CMakeLists.txt
mlir/tools/mlir-rocm-runner/mlir-rocm-runner.cpp