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]: failure of AMDGPU DAG->DAG Pattern Instruction Selection due to llvm.llrint.i64.f32 #90

Open
ravil-mobile opened this issue May 20, 2024 · 1 comment

Comments

@ravil-mobile
Copy link

ravil-mobile commented May 20, 2024

Problem Description

The compiler from [email protected] suite fails to generate the code for llvm.llrint.i64.f32.

Operating System

Ubuntu 20.04.1 LTS

CPU

Intel(R) Xeon(R) Gold 6132 CPU

GPU

AMD Instinct MI100

ROCm Version

ROCm 6.0.0

ROCm Component

llvm-project

Steps to Reproduce

Here is a small reproducible example (func.ll)

declare i64 @llvm.llrint.i64.f32(float)

define i64 @convert(float %arg) {
entry:
  %0 = tail call i64 @llvm.llrint.i64.f32(float %arg)
  ret i64 %0
}

Here is the corresponding Makefile

CC=/opt/rocm/llvm/bin/llc

x86: func.ll
        $(CC) $< -mtriple="x86_64-linux-gnu" -o x86.o

amdgcn: func.ll
        $(CC) $< -mtriple="amdgcn-amd-amdhsa" -o amdgcn.o

clean:
        rm -f x86.o amdgcn.o

Execute the following to reproduce the bug

make amdgcn

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

No response

Additional Information

This bug was discovered during code generation of a Triton kernel. The original source of the issue is here.

@ppanchad-amd
Copy link

@ravil-mobile Internal ticket has been created to investigate this issue. Thanks!

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

No branches or pull requests

2 participants