Skip to content

pti: move libpti.so driver to the custom $libdir/pti folder #112

Description

@dvrogozh

With: a928b93

Install the following dependencies:

$ docker run -it --rm ubuntu:26.04
# apt-get update && apt-get install git cmake make g++ gcc pkg-config python3 libze-dev
# apt-get install dpclang-6

Configure and install the project:

# cd sdk
# cmake -B _build -DCMAKE_C_COMPILER=dpclang -DCMAKE_CXX_COMPILER=dpclang++ \
    -DCMAKE_INSTALL_PREFIX=/opt/_install .
# make -j16 -C _build/ install

The installation will look like the following:

# tree /opt/_install/
/opt/_install/
|-- include
|   `-- pti
|       |-- pti.h
|       |-- pti_callback.h
|       |-- pti_driver_levelzero_api_ids.h
|       |-- pti_export.h
|       |-- pti_metrics.h
|       |-- pti_metrics_scope.h
|       |-- pti_runtime_sycl_api_ids.h
|       |-- pti_version.h
|       `-- pti_view.h
|-- lib
|   |-- cmake
|   |   `-- pti
|   |       |-- PtiConfig.cmake
|   |       |-- PtiConfigVersion.cmake
|   |       |-- PtiTargets-release.cmake
|   |       `-- PtiTargets.cmake
|   |-- libpti.so
|   |-- libpti_view.so -> libpti_view.so.0
|   |-- libpti_view.so.0 -> libpti_view.so.0.17.0
|   `-- libpti_view.so.0.17.0
`-- share
    `-- doc
        `-- pti
            `-- LICENSE.txt

9 directories, 18 files

The libpti.so library is unversioned and as far as I know is kind of a driver/plugin for libpti_view.so which is an actual user entry point. As such:

  1. libpti.so should not be installed to $libdir (at least by default) and instead placed into $libdir/pti instead
  2. libpti_view.so must use hardcoded path to load the libpti.so, for example by doing dlopen("./pti/libpti.so"). This also can be handled in other ways such as adding /etc/pti.conf file which would hold PTI configuration such as driver location. Or hardcoding the location during build time configuration. However, I believe that using location relative to libpti_view.so should be a good starting point.

CC: @mschilling0 @frenchwr

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions