Skip to content

SPIR-V vector splat+extract canonicalization missing.  #7323

Closed

Description

@benvanik

Hit this IR produced by SPIRVVectorize:

  %50 = math.sqrt %cst : f32
  %67 = splat %50 : vector<1x2x2x4xf32>
  %68 = vector.extract_strided_slice %67 {offsets = [0, 0, 0, 0], sizes = [1, 1, 1, 4], strides = [1, 1, 1, 1]} : vector<1x2x2x4xf32> to vector<1x1x1x4xf32>
  %69 = divf %60, %68 : vector<1x1x1x4xf32>

that then fails to convert to SPIR-V (failed to legalize operation 'std.splat').

Repro:

iree-translate \
    -iree-mlir-to-vm-bytecode-module \
    -iree-hal-target-backends=vulkan-spirv \
    -iree-input-type=mhlo \
    tf_mid_level_input.mlir

tf_mid_level_input.zip

Activity

  1. added
    codegen/spirv
    on Oct 13, 2021
  2. added a commit that references this issue on Oct 13, 2021
  3. ThomasRaoux commented on Oct 13, 2021

    @ThomasRaoux
    Contributor
  4. ThomasRaoux commented on Oct 13, 2021

    @ThomasRaoux
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

codegen/spirv

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions