Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geekbench5: add compute benchmark support #89124

Merged
merged 1 commit into from Aug 8, 2020
Merged

Conversation

davidak
Copy link
Member

@davidak davidak commented May 28, 2020

Motivation for this change

I want to use the compute benchmark.

Fixes #87990

Devices are detected now:

OpenCL
0 0 AMD Radeon (TM) RX 480 Graphics (POLARIS10, DRM 3.36.0, 5.6.13, LLVM 9.0.1)
Vulkan
0 0 AMD RADV POLARIS10 (LLVM 9.0.1)

OpenCL benchmark fails, but Vulkan works.

cc maintainer @michalrus

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size: Closure size difference is 328.81 MB (189.28%).
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Member

@michalrus michalrus left a comment

Choose a reason for hiding this comment

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

Great, thank you! 😻

@davidak
Copy link
Member Author

davidak commented Aug 7, 2020

Still works after the update in #94418.

@davidak
Copy link
Member Author

davidak commented Aug 7, 2020

/marvin opt-in
/status needs_reviewer

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/199

Copy link
Member

@timokau timokau left a comment

Choose a reason for hiding this comment

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

Normally the nvidia dependency should be made optional, but since the package is already unfree that is probably okay. Thank you!

@timokau timokau merged commit ed9363d into NixOS:master Aug 8, 2020
ln -s ${ocl-icd}/lib/libOpenCL.so $out/lib/
ln -s ${ocl-icd}/lib/libOpenCL.so.1 $out/lib/
ln -s ${vulkan-loader}/lib/libvulkan.so $out/lib/
ln -s ${vulkan-loader}/lib/libvulkan.so.1 $out/lib/
Copy link
Member

Choose a reason for hiding this comment

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

Only noticing this after merging: Do you specify version 1 on purpose, or should this maybe link all versions instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's what geekbench5 tried to open: #87990 (comment)

the opencl issue don't look related to a library missing #94982

do you think it could be an improvement?

Copy link
Member Author

Choose a reason for hiding this comment

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

There is actually just one version, with different names.

ls -la ${ocl-icd}/lib/
-r-xr-xr-x 1 nobody nogroup    994 Jan  1  1970 libOpenCL.la
lrwxrwxrwx 1 nobody nogroup     18 Jan  1  1970 libOpenCL.so -> libOpenCL.so.1.0.0
lrwxrwxrwx 1 nobody nogroup     18 Jan  1  1970 libOpenCL.so.1 -> libOpenCL.so.1.0.0
-r-xr-xr-x 1 nobody nogroup 150576 Jan  1  1970 libOpenCL.so.1.0.0
dr-xr-xr-x 2 nobody nogroup   4096 Jan  1  1970 pkgconfig
ls -la ${vulkan-loader}/lib/
lrwxrwxrwx 1 nobody nogroup     14 Jan  1  1970 libvulkan.so -> libvulkan.so.1
lrwxrwxrwx 1 nobody nogroup     20 Jan  1  1970 libvulkan.so.1 -> libvulkan.so.1.2.131
-r-xr-xr-x 1 nobody nogroup 458168 Jan  1  1970 libvulkan.so.1.2.131

Copy link
Member

Choose a reason for hiding this comment

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

Yes, the usual naming convention is that libsomething.so will link to the latest version, libsomething.so.n will link to version n. So in this case, it might break if libvulkan 2 is released.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, i understand. but it will not improve the current situation if all files are copied.
i will add that later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

geekbench5 don't find compute devices
4 participants