Skip to content

Error when slicing MemRef with memory_space #109

@Ritsuka314

Description

@Ritsuka314
MemRefT = MemRef.get((DYNAMIC,), F32, memory_space=GPU_AddrSpace.Global)
@compile(auto_build=False)
def f(m: MemRefT):
    n = m[:]

gives error

mlir._mlir_libs._site_initialize.<locals>.MLIRError: Verification failed:
error: unknown: different memory spaces specified for
base memref type 'memref<?xf32, #gpu.address_space<global>>' and
subview memref type 'memref<?xf32, strided<[?], offset: ?>>'
 note: unknown: see current operation: %6 = "memref.subview"(%arg0, %2, %5, %3) <{operandSegmentSizes = array<i32: 1, 1, 1, 1>, static_offsets = array<i64: -9223372036854775808>, static_sizes = array<i64: -9223372036854775808>, static_strides = array<i64: -9223372036854775808>}> : (memref<?xf32, #gpu.address_space<global>>, index, index, index) -> memref<?xf32, strided<[?], offset: ?>>

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingsmallNot much effort

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions