Skip to content

Conversation

@Krastanov
Copy link
Collaborator

rocm_smi_lib provides a library that reads virtual files
in the Linux file system in order to report GPU performance
parameters.

Both the library and the standard Python script that provides
a CLI for the library are included.

On a system with a functional AMD GPU and a Python 3
interpreter it can be tested with:

run(`python3 $(rocm_smi_lib_jll.rocm_smipy_path)`)

`rocm_smi_lib` provides a library that reads virtual files
in the Linux file system in order to report GPU performance
parameters.

Both the library and the standard Python script that provides
a CLI for the library are included.
@Krastanov
Copy link
Collaborator Author

I felt the need to include the python files because:

  • they are not python packages, just a single script that provides a CLI interface to the so file
  • they have hardcoded paths in them which would require to patch them if we package them separately
  • that way keeping the versions in sync is trivial
  • they happen to not depend on anything else (only standard library)

@Krastanov
Copy link
Collaborator Author

And yes, long term we will probably just interface into the so library from Julia, without using the python script.

@vchuravy
Copy link
Member

vchuravy commented Feb 1, 2022

cc: @jpsamaroo

Copy link
Member

@giordano giordano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file must be called build_tarballs.jl

@Krastanov
Copy link
Collaborator Author

That was embarrassing :D Should be fixed now.

@giordano
Copy link
Member

giordano commented Feb 1, 2022

Can build for more platforms? Or it's relevant only for x86-64 Linux?

@Krastanov
Copy link
Collaborator Author

AMD supports ROCm only on x86-64 Linux. It can probably built on any linux (it is a trivial C library that reads some virtual files), but those virtual files would never exist on another linux.

script = raw"""
cd ${WORKSPACE}/srcdir/rocm_smi_lib-rocm-*/
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=${prefix} -DCMAKE_PREFIX_PATH=${prefix} ..
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, noted! I just copied this from rocminfo_jll. I will have to look into what these differences mean, as I do not have experience with cmake.

@giordano giordano merged commit 1bc2d4d into JuliaPackaging:master Feb 1, 2022
@jpsamaroo
Copy link
Contributor

@Krastanov if you want to update this for ROCm 4.2.0, we can pull this JLL into JuliaGPU/AMDGPU.jl#187.

@Krastanov
Copy link
Collaborator Author

@jpsamaroo , I will do so by the end of the week.

@Krastanov
Copy link
Collaborator Author

Admittedly it is a single character diff, but I would like to check that it actually works on the hardware I have.

@Krastanov
Copy link
Collaborator Author

@jpsamaroo , here is the 4.2.0 #4350

simeonschaub pushed a commit to simeonschaub/Yggdrasil that referenced this pull request Feb 23, 2022
* Add rocm_smi_lib

`rocm_smi_lib` provides a library that reads virtual files
in the Linux file system in order to report GPU performance
parameters.

Both the library and the standard Python script that provides
a CLI for the library are included.

* Fix filename typo

* Use -DCMAKE_TOOLCHAIN_FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants