hipBLAS icon indicating copy to clipboard operation
hipBLAS copied to clipboard

Load rocSOLVER with dlopen at runtime

Open daineAMD opened this issue 1 year ago • 5 comments

Don't have access to a windows machine so this hasn't been tested on windows yet.

See https://github.com/ROCm/hipBLAS/issues/896 for the request. Similar changes for hipSOLVER have been done at hipSOLVER #302

This change allows hipBLAS to build without rocSOLVER available at buildtime. By default, hipBLAS will try to find rocSOLVER at runtime using dlopen(). If rocSOLVER cannot be found, the rocsolver-based functions will return HIPBLAS_STATUS_NOT_IMPLEMENTED.

The -n flags has been changed to mean "don't build rocSOLVER tests". The --solver-buildtime flags has been added to find rocSOVLER at build time.

Also added some flags for jenkins so will be testing the various flags on CI.

daineAMD avatar Aug 19 '24 19:08 daineAMD

Is the static build without solver_buildtime the default as that creates an invalid static library?

It's valid. It's just unlikely that you'd want a static hipblas and a dynamic rocsolver.

cgmb avatar Aug 20 '24 03:08 cgmb

You may want to adjust the CMake that defines the package dependencies to recommend and/or suggest the rocsolver package to users that install hipblas.

cgmb avatar Aug 20 '24 04:08 cgmb

Is the static build without solver_buildtime the default as that creates an invalid static library?

It's valid. It's just unlikely that you'd want a static hipblas and a dynamic rocsolver.

Invalid in the sense that neither a customer nor developer would want it (we don't want failing tests for bad configs), let alone be default. Maybe a conditional option should be used?

TorreZuk avatar Aug 20 '24 14:08 TorreZuk

Invalid in the sense that neither a customer nor developer would want it (we don't want failing tests for bad configs), let alone be default. Maybe a conditional option should be used?

Keep in mind that we're not distinguishing between 'maybe rocsolver at runtime' and 'no rocsolver'. The configuration of 'static hipblas with no rocsolver' is something that developers may want.

cgmb avatar Aug 21 '24 17:08 cgmb

Invalid in the sense that neither a customer nor developer would want it (we don't want failing tests for bad configs), let alone be default. Maybe a conditional option should be used?

Keep in mind that we're not distinguishing between 'maybe rocsolver at runtime' and 'no rocsolver'. The configuration of 'static hipblas with no rocsolver' is something that developers may want.

The flags are confusing me maybe keeping -n --no-solver as never any solver is simpler (both shared and static). What this seems to be is an architeture option to delays .so loading to make it optional. Should discuss an overall roadmap feature request for this change for hip libraries.

TorreZuk avatar Aug 21 '24 17:08 TorreZuk

Unable to import due to merge conflict please reopen this PR on ROCm/rocm-libraries

ammallya avatar Jul 23 '25 19:07 ammallya