Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
amdgpu-device-libs 
Support library for the amdgpu target.
By default, the amdgpu target supports core, but not std.
alloc is supported when a global allocator is specified.
amdgpu-device-libs brings some std-like features to the amdgpu target:
print!()andprintln!()macros for printing on the host stdout- A global allocator to support
alloc - A panic handler
- Access to more intrinsics and device-libs functions
All these features are enabled by default, but can be turned on selectively with default-features = false, features = […].
amdgpu-device-libs works by linking to the ROCm device-libs and a pre-compiled helper library.
The libraries are linked from a ROCm installation.
If libraries are found not found by default, set the environment variable
HIP_DEVICE_LIB_PATH to the bitcode files. The path should end with amdgcn/bitcode
and contain .bc files.
Usage
Create a new cargo library project and change it to compile a cdylib:
# Cargo.toml
# In old Rust versions (before #149624), lto needed to be forced with `[profile.dev] lto = true` and `[profile.release] lto = true`
[]
# Compile a cdylib
= ["cdylib"]
[]
# Used in build script to specify linker flags and link in device-libs
= "<version>"
[]
= "<version>"
Add extra flags in .cargo/config.toml:
# .cargo/config.toml
[]
= "amdgcn-amd-amdhsa"
# Enable linker-plugin-lto
# Either add -Ctarget-cpu=gfx<version> here or specify it in CARGO_BUILD_RUSTFLAGS='-Ctarget-cpu=gfx<version>'
# Note that setting RUSTFLAGS overwrites the flags added here!
# In old Rust versions (before #136840), linker-plugin-lto is not working as expected and -Zemit-thin-lto=no needs to be added to rustflags
= ["-Clinker-plugin-lto"]
[]
= ["core", "alloc"]
And add a build.rs build script that links to the required libraries:
// build.rs
Example
Minimal usage sample, see examples/println for the full code.
extern crate alloc;
use Vec;
use *;
pub extern "gpu-kernel"