Skip to content

never build or install libze_loader #1110

@bratpiorka

Description

@bratpiorka

In any case, we should never build or install libze_loader.

Currently, when the user enables the Level Zero Memory Provider, only the 'ze_api.h' header is required for building.
If the user sets the UMF_LEVEL_ZERO_INCLUDE_DIR, the header is taken from this location.
If not, Level Zero is fetched, built, and added to the make-install targets, which is incorrect.

Moreover, the libze_loader library should be used only in GPU tests, benchmarks, and examples.
This library should never be built by UMF.

The fix should:

  • use UMF_LEVEL_ZERO_INCLUDE_DIR as the primary source for obtaining 'ze_api.h'

  • if this variable is not set, Level Zero should be located using CMake's find_package()

  • only then should the Level Zero header be fetched from GitHub, but without calling FetchContent_MakeAvailable()

  • introduce a new UMF_LEVEL_ZERO_LIB_DIR variable that should be checked for the libze_loader library.

  • if this variable is not set, find_package() should attempt to locate Level Zero libraries (note: the workflows in UMF should utilize this).

Additionally, the behavior between Level Zero and CUDA should be consistent.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions