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

[Issue]: Multiple definition error caused by using <hip/hip_bf16.h> #3403

Closed
lhcalibur opened this issue Feb 2, 2024 · 1 comment
Closed

Comments

@lhcalibur
Copy link

Problem Description

The function in <hip/hip_bf16.h> is defined without inline , which will cause multi definition error when using this header file in multi .cu/.hip files.

For example the code:

 /**
  * \ingroup HIP_INTRINSIC_BFLOAT162_CONV
  * \brief Returns low 16 bits of __hip_bfloat162
  */
 __device__ __hip_bfloat16 __low2bfloat16(const __hip_bfloat162 a) { return a.x; }

Operating System

Ubuntu 22.04

CPU

AMD EPYC

GPU

AMD Instinct MI250

ROCm Version

ROCm 6.0.0

ROCm Component

HIP

Steps to Reproduce

No response

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

@mangupta
Copy link
Contributor

mangupta commented Feb 2, 2024

@lhcalibur : This is already resolved via ROCm/clr@86bd518 and ROCm/clr@77c581a

@mangupta mangupta closed this as completed Feb 2, 2024
mschwaig added a commit to mschwaig/nixpkgs that referenced this issue Mar 22, 2024
NixOS#286720 introduced these patches to address
a specific compilation error mentioned in ROCm/HIP#3403,
but added them to the source tree because they were originally for ROCm 6.

For ROCm 6, we can now switch to using fetchpatch to get the original commits as patches.
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

No branches or pull requests

2 participants