lamikr / rocm_sdk_builder

Other
113 stars 8 forks source link

Nice to have: Configurable install path #3

Open flip111 opened 1 month ago

flip111 commented 1 month ago

It would be nice to have a configurable installation path other than /opt/rock_sdk_<version>/

paulmenzel commented 1 month ago

(It is /opt/rocm_sdk_<version>/.)

/opt/rocm should also be configurable.

Unfortunately, this seems to be hard coded in a lot of places.

lamikr commented 1 month ago

Actually it should not be hardcoded. It should work if you change the following line in binfo/envsetup.sh

export INSTALL_DIR_PREFIX_SDK_ROOT=/opt/rocmsdk${ROCM_MAJOR_VERSION}${ROCM_MINOR_VERSION}${ROCM_PATCH_VERSION}

I have not tested any other destinations than under /opt/ but it should work if you set it up under user home directory for example.

When the sdk builder builds projects, it uses this variable to setup other project specific variables like "ROCM_HOME" or ROCM_PATH and I try to set these values always in code to be same than this INSTALL_DIR_PREFIX_SDK_ROOT. If not then, it's a bug.

Some of the original projects have used hardcoded path (usually /opt/rocm) but I have tried to patch them in a way that they will first try to check location that is given them as a parameter via cmake or environment variable. (for example pytorch build script takes install path and sdk version as a parameter and then passes them further to build process).

Configuration menu system would be ideal place for changing this, but at the moment it's needs to be done via modifying this envsetup.sh script.