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

[MLIR] Error in coverting fptoui from arith to spirv #59958

Closed
stevesuzuki-arm opened this issue Jan 12, 2023 · 3 comments
Closed

[MLIR] Error in coverting fptoui from arith to spirv #59958

stevesuzuki-arm opened this issue Jan 12, 2023 · 3 comments
Assignees

Comments

@stevesuzuki-arm
Copy link
Contributor

module attributes {} {
    func.func @fptoui(%arg0 : f32) -> i32 {
        %0 = arith.fptoui %arg0 : f32 to i32
        return %0 : i32
    }
}
mlir-opt --convert-arith-to-spirv

produces the error below

error: failed to legalize operation 'arith.fptoui' that was explicitly marked illegal
        %0 = arith.fptoui %arg0 : f32 to i32

Expected output:

module {
  func.func @fptoui(%arg0: f32) -> i32 {
    %0 = spirv.ConvertFToU %arg0 : f32 to i32
    return %0 : i32
  }
}
@stevesuzuki-arm
Copy link
Contributor Author

@llvmbot
Copy link
Collaborator

llvmbot commented Jan 12, 2023

@llvm/issue-subscribers-mlir-spirv

@kuhar kuhar assigned kuhar and stevesuzuki-arm and unassigned kuhar Jan 12, 2023
@stevesuzuki-arm
Copy link
Contributor Author

Resolved by e866fb8

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

4 participants