iree-org / iree

A retargetable MLIR-based machine learning compiler and runtime toolkit.

Home Page:http://iree.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove absent hc.bc file from list in GetROCDLPaths()

pcf000 opened this issue · comments

The function GetROCDLPaths() in ROCMTargetUtils.cpp sets up a list of bitcode filenames. As of ROCm 5.0, the file "hc.bc" is no longer shipped. Since it's in the list but not present, LinkWithBitcodeVector() will signal an error.

I encountered this problem while running models using torch-mlir, IREE, and ROCm 5.0.0, targeted at rocm. Instructions to reproduce will be kind of long, but I can attach them if needed.

It appears that hc.bc was deprecated for ROCm 3.5, released around June 2020, and removed from the ROCm source in November 2021. The simplest patch is to remove it from the list in GetROCDLPaths(). If we want to be a bit more robust, we could leave it in, but check that a file exists before adding it to the return vector. (Although that's redundant somewhat with the error check in LinkWithBitcodeVector().)