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

'spirv.Bitcast' op result #0 must be 8/16/32/64-bit... got a 'vector<1xf32>' -- Shark on MacOS(Vulkan gpu) #62

Closed
Ranvirsv opened this issue Jun 2, 2023 · 0 comments

Comments

@Ranvirsv
Copy link

Ranvirsv commented Jun 2, 2023

What happened?

Trying to run shark on MacOS(Mac with M2 pro chip) with vulkan gpu, it runs into the issue:

<eval_with_key>.25:146:17: error: 'spirv.Bitcast' op result #0 must be 8/16/32/64-bit integer or 16/32/64-bit float or bool or vector of bool or 8/16/32/64-bit integer or 16/32/64-bit float values of length 2/3/4/8/16 or any SPIR-V pointer type, but got 'vector<1xf32>'
<eval_with_key>.25:146:17: note: see current operation: %119 = "spirv.Bitcast"(%114) : (vector<2xf16>) -> vector<1xf32>

I have attached the error.log file
error.log

Steps to reproduce your issue

  1. cd SHARK

  2. Get the input mlir
    Set the location for IREE_SAVE_TEMPS
    export IREE_SAVE_TEMPS=/path/to/some/directory

    Run the command to get the inpur mlir
    python3 apps/stable_diffusion/scripts/txt2img.py -p "a photograph of an astronaut riding a horse" --save_vmfb

  3. Compile the core-input.mlir
    iree-compile-binary path\to\core-input.mlir --iree-vulkan-target-triple=m1-unknown-macos --iree-stream-resource-index-bits=64 --iree-vm-target-index-bits=64 --iree-hal-target-backends=vulkan -o core.vmfb 2> error.log

@Ranvirsv Ranvirsv changed the title failed to legalize operation 'vector.bitcast' -- Shark on MacOS(Vulkan gpu) failed to legalize operation 'sprv.Bitcast' -- Shark on MacOS(Vulkan gpu) Jun 3, 2023
@Ranvirsv Ranvirsv changed the title failed to legalize operation 'sprv.Bitcast' -- Shark on MacOS(Vulkan gpu) failed to legalize operation 'spirv.Bitcast' -- Shark on MacOS(Vulkan gpu) Jun 3, 2023
@Ranvirsv Ranvirsv changed the title failed to legalize operation 'spirv.Bitcast' -- Shark on MacOS(Vulkan gpu) 'spirv.Bitcast' op result #0 must be 8/16/32/64-bit... got a 'vector<1xf32>' -- Shark on MacOS(Vulkan gpu) Jun 5, 2023
@Ranvirsv Ranvirsv closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2023
powderluv pushed a commit that referenced this issue Sep 25, 2023
Includes API break fixes.
Incorporates upstream fix: fixes #57
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

1 participant