starpu-runtime / starpu

This is a mirror of https://gitlab.inria.fr/starpu/starpu where our development happens, but contributions are welcome here too!
https://starpu.gitlabpages.inria.fr/
GNU Lesser General Public License v2.1
63 stars 12 forks source link

Missing include in driver_hip.c? #46

Closed devreal closed 6 months ago

devreal commented 6 months ago

Steps to reproduce

I am trying to build StarPU on Frontier (with rocm/5.7.1) where I downloaded the StarPU 1.4.5 release tarball and simply ran configure without any platform specific arguments.

Obtained behavior

I'm seeing the following errors:

../../src/drivers/hip/driver_hip.c: In function 'starpu_hipblas_report_error':
../../src/drivers/hip/driver_hip.c:1612:22: error: 'HIPBLAS_STATUS_SUCCESS' undeclared (first use in this function); did you mean 'HIP_SUCCESS'?
                 case HIPBLAS_STATUS_SUCCESS:
                      ^~~~~~~~~~~~~~~~~~~~~~
                      HIP_SUCCESS
../../src/drivers/hip/driver_hip.c:1612:22: note: each undeclared identifier is reported only once for each function it appears in
../../src/drivers/hip/driver_hip.c:1615:22: error: 'HIPBLAS_STATUS_NOT_INITIALIZED' undeclared (first use in this function); did you mean 'HIP_ERROR_NOT_INITIALIZED'?
                 case HIPBLAS_STATUS_NOT_INITIALIZED:
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                      HIP_ERROR_NOT_INITIALIZED
../../src/drivers/hip/driver_hip.c:1618:22: error: 'HIPBLAS_STATUS_ALLOC_FAILED' undeclared (first use in this function); did you mean 'HIPBLAS_STATUS_NOT_INITIALIZED'?
                 case HIPBLAS_STATUS_ALLOC_FAILED:
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                      HIPBLAS_STATUS_NOT_INITIALIZED
../../src/drivers/hip/driver_hip.c:1621:22: error: 'HIPBLAS_STATUS_INVALID_VALUE' undeclared (first use in this function); did you mean 'HIPBLAS_STATUS_ALLOC_FAILED'?
                 case HIPBLAS_STATUS_INVALID_VALUE:
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                      HIPBLAS_STATUS_ALLOC_FAILED
../../src/drivers/hip/driver_hip.c:1624:22: error: 'HIPBLAS_STATUS_ARCH_MISMATCH' undeclared (first use in this function); did you mean 'HIPBLAS_STATUS_SUCCESS'?
                 case HIPBLAS_STATUS_ARCH_MISMATCH:
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                      HIPBLAS_STATUS_SUCCESS
  CC       core/disk_ops/disk_unistd_o_direct.lo
../../src/drivers/hip/driver_hip.c:1627:22: error: 'HIPBLAS_STATUS_EXECUTION_FAILED' undeclared (first use in this function); did you mean 'HIPBLAS_STATUS_ALLOC_FAILED'?
                 case HIPBLAS_STATUS_EXECUTION_FAILED:
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                      HIPBLAS_STATUS_ALLOC_FAILED

It looks like the include for hipblas/hipblas.h is missing. Adding the include manually fixes the build.

Expected behavior

Please describe the result that you expected instead.

Configuration

The configure line you used.

Configuration result

Please attach the config.log file from the build tree.

Distribution

Its type and version

Version of StarPU

The tarball version, or the git branch hash.

Version of GPU drivers

If you are using CUDA/OpenCL/HIP, the version being used.

nfurmento commented 6 months ago

Hello,

The file hipblas/hipblas.h is already included in include/starpu_hip.h

Can you please send your file config.log that we can get more information on your compilation process ?

Cheers,

Nathalie

devreal commented 6 months ago

I think the problem is that include/starpu_config.h only defines STARPU_USE_HIP but not STARPU_USE_HIPBLAS. It is defined in src/common/config.h but that is not included from include/starpu_config.h (since that is public) or include/starpu_hip.h. The inclusion of hipblas.h is conditioned on STARPU_USE_HIPBLAS in include/starpu_hip.h.

Here is the config.log.

nfurmento commented 6 months ago

oh, that was indeed fixed in the master but we forgot to backport it in the branch. It is now available (in gitlab and tomorrow in github), i will release 1.4.6 tomorrow, or you can use the git branch 1.4.

nfurmento commented 6 months ago

The latest release of StarPU 1.4.6 is just out. It should fix your bugs.