[MLIR][Vector] Allow non-default memory spaces in gather/scatter lowerings (#67500)
GPU targets can gather on non-default address spaces (e.g. global), so this removes the check for the default memory space.
This commit is contained in:
@@ -87,14 +87,12 @@ LogicalResult getMemRefAlignment(const LLVMTypeConverter &typeConverter,
|
||||
return success();
|
||||
}
|
||||
|
||||
// Check if the last stride is non-unit or the memory space is not zero.
|
||||
// Check if the last stride is non-unit and has a valid memory space.
|
||||
static LogicalResult isMemRefTypeSupported(MemRefType memRefType,
|
||||
const LLVMTypeConverter &converter) {
|
||||
if (!isLastMemrefDimUnitStride(memRefType))
|
||||
return failure();
|
||||
FailureOr<unsigned> addressSpace =
|
||||
converter.getMemRefAddressSpace(memRefType);
|
||||
if (failed(addressSpace) || *addressSpace != 0)
|
||||
if (failed(converter.getMemRefAddressSpace(memRefType)))
|
||||
return failure();
|
||||
return success();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user