Skip to content

failed to legalize operation 'tosa.apply_scale' in vulkan-spirv backend #11081

Closed

Description

@hanhanW

Hit a compilation error in #11069

To repro: iree-compile --output-format=vm-bytecode --iree-hal-target-backends=vulkan-spirv tests/e2e/tosa_ops/mul.mlir -o /tmp/mul.vmfb --iree-input-type=tosa

tests/e2e/tosa_ops/mul.mlir:24:13: error: failed to legalize operation 'tosa.apply_scale'
  %result = "tosa.mul"(%0, %1) {shift = 1 : i32} : (tensor<5xi32>, tensor<5xi32>) -> tensor<5xi32>
            ^
tests/e2e/tosa_ops/mul.mlir:24:13: note: see current operation: %56 = "tosa.apply_scale"(%47, %55, %7) {double_round = false} : (i32, i32, i8) -> i32
tests/e2e/tosa_ops/mul.mlir:24:13: error: failed to run translation of source executable to target executable for backend #hal.executable.target<"vulkan", "vulkan-spirv-fb", {spirv.targe
t_env = #spirv.target_env<#spirv.vce<v1.3, [Shader, GroupNonUniform, GroupNonUniformVote, GroupNonUniformArithmetic, GroupNonUniformBallot, GroupNonUniformShuffle, GroupNonUniformShuffle
Relative], [SPV_KHR_storage_buffer_storage_class]>, SwiftShader:CPU, #spirv.resource_limits<max_compute_workgroup_size = [128, 128, 64], subgroup_size = 4, cooperative_matrix_properties_
nv = []>>}>
  %result = "tosa.mul"(%0, %1) {shift = 1 : i32} : (tensor<5xi32>, tensor<5xi32>) -> tensor<5xi32>

Activity

  1. added
    bug 🐞
    codegen/spirv
    on Nov 8, 2022
  2. antiagainst commented on Nov 8, 2022

    @antiagainst
    Member

    Related to #10996 and #11008. Assigning to @kuhar.

  3. removed their assignment
    on Nov 8, 2022
  4. kuhar commented on Nov 16, 2022

    @kuhar
    Member

    I checked and iree-compile does not crash with the commits above

  5. moved this to Done in IREEon Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug 🐞codegen/spirv

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions