Skip to content

[mlir] vector.transfer_read and vector.transfer_write allow different source and destination element type #134268

Open
@douyixuan

Description

@douyixuan

Originally posted by @banach-space in #133721 (comment)

The test case can be found at

mlir/test/Dialect/Vector/invalid.mlir:528

func.func @test_vector.transfer_read(%arg1: memref<?xindex>) -> vector<3x4xi32> {
  %c3 = arith.constant 3 : index
  // expected-error@+1 {{expected a custom permutation_map when source rank is less than required for vector rank}}
  %0 = vector.transfer_read %arg1[%c3, %c3], %c3 : memref<?xindex>, vector<3x4xi32>
  return %0 : vector<3x4xi32>
}

mlir/test/Dialect/Vector/invalid.mlir:658

func.func @test_vector.transfer_write(%vec_to_write: vector<3x4xi32>, %output_memref: memref<?xindex>) {
  %c3 = arith.constant 3 : index
  // expected-error@+1 {{expected a custom permutation_map when result rank is less than required for vector rank}}
  vector.transfer_write %vec_to_write, %output_memref[%c3, %c3] : vector<3x4xi32>, memref<?xindex>
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions