[Bug 2209759] Review Request: rocclr - ROCm Compute Language Runtime

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=2209759



--- Comment #16 from Philipp K. <philipp-dev@xxxxxxxxxxxxx> ---
(In reply to Tom Rix from comment #14)
> From comments in clang/lib/Driver/ToolChains/AMDGPU.cpp,
> detectDeviceLibrary()  
> // Find device libraries in <LLVM_DIR>/lib/clang/<ver>/lib/amdgcn/bitcode   
> 
>   LibDevicePath = D.ResourceDir;                                            
> 
>   llvm::sys::path::append(LibDevicePath, CLANG_INSTALL_LIBDIR_BASENAME,     
> 
>                           "amdgcn", "bitcode");                             
> 
>   HasDeviceLibrary = CheckDeviceLib(LibDevicePath, true);                   
> 
>   if (HasDeviceLibrary)                                                     
> 
>     return;
> 
> simply copying the directory there does not work, so i suspect this will
> need to
> with 2 changes.
For me it worked when copying to /usr/lib64/clang/16/amdgcn/bitcode. Cf. my
patch above. Maybe the code comment in the clang/llvm codebase is out of sync?
Or maybe the "/lib" is missing somewhere in the clang/llvm codebase?

(In reply to Jeremy Newton from comment #15)
> > Also rocm-opencl should probably require rocm-device-libs anyway.
> 
> How come? I don't see any code paths in OpenCL requiring it at all. Hip
> needs it because of hipcc as far as I know and rocm-device-libs is used
> generally during compilation. In other words, rocm-device-libs is not a
> runtime dependency, only build time.
As far as I can tell, both pull them in as runtime dependencies. For OpenCL it
is somehow expected, since this is IIRC the programming model after all, there
is no binary precompilation and code is expected to run everywhere, thus
requiring compiling/linking; the full package.

For, HIP i consider this in fact a bug (with the issue linked above), since in
general I would expect the precompilation to be done, and no .bc files to be of
need anymore at runtime.

To test this, run any OpenCL application (e.g. clinfo) or any HIP application
with hipMemcpy (e.g. the square example) with AMD_COMGR_REDIRECT_LOGS=stdout
AMD_COMGR_EMIT_VERBOSE_LOGS=1. For me in both cases I see a line that reads
AMD_COMGR_ACTION_ADD_DEVICE_LIBRARIES followed by
AMD_COMGR_ACTION_LINK_BC_TO_BC, which seems to link the *.bc files from
rocm-device-libs.

The respective code seems in both cases to reside in rocclr:
https://github.com/ROCm-Developer-Tools/ROCclr/blob/develop/device/devprogram.cpp


-- 
You are receiving this mail because:
You are always notified about changes to this product and component
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2209759
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux