Skip to content

Commit 8b02ceb

Browse files
committed
Revert "[mlir][index][spirv] Add conversion for index to spirv (#68085)"
This caused linker issues on a buildbot: https://lab.llvm.org/buildbot/#/builders/61/builds/50716. This reverts commit 3c07a21.
1 parent c6f0f88 commit 8b02ceb

File tree

10 files changed

+3
-747
lines changed

10 files changed

+3
-747
lines changed

mlir/include/mlir/Conversion/IndexToSPIRV/IndexToSPIRV.h

Lines changed: 0 additions & 30 deletions
This file was deleted.

mlir/include/mlir/Conversion/Passes.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#include "mlir/Conversion/GPUToSPIRV/GPUToSPIRVPass.h"
3636
#include "mlir/Conversion/GPUToVulkan/ConvertGPUToVulkanPass.h"
3737
#include "mlir/Conversion/IndexToLLVM/IndexToLLVM.h"
38-
#include "mlir/Conversion/IndexToSPIRV/IndexToSPIRV.h"
3938
#include "mlir/Conversion/LinalgToStandard/LinalgToStandard.h"
4039
#include "mlir/Conversion/MathToFuncs/MathToFuncs.h"
4140
#include "mlir/Conversion/MathToLLVM/MathToLLVM.h"

mlir/include/mlir/Conversion/Passes.td

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -644,28 +644,6 @@ def ConvertIndexToLLVMPass : Pass<"convert-index-to-llvm"> {
644644
];
645645
}
646646

647-
//===----------------------------------------------------------------------===//
648-
// ConvertIndexToSPIRVPass
649-
//===----------------------------------------------------------------------===//
650-
651-
def ConvertIndexToSPIRVPass : Pass<"convert-index-to-spirv"> {
652-
let summary = "Lower the `index` dialect to the `spirv` dialect.";
653-
let description = [{
654-
This pass lowers Index dialect operations to SPIR-V dialect operations.
655-
Operation conversions are 1-to-1 except for the exotic divides: `ceildivs`,
656-
`ceildivu`, and `floordivs`. The index bitwidth will be 32 or 64 as
657-
specified by use-64bit-index.
658-
}];
659-
660-
let dependentDialects = ["::mlir::spirv::SPIRVDialect"];
661-
662-
let options = [
663-
Option<"use64bitIndex", "use-64bit-index",
664-
"bool", /*default=*/"false",
665-
"Use 64-bit integers to convert index types">
666-
];
667-
}
668-
669647
//===----------------------------------------------------------------------===//
670648
// LinalgToStandard
671649
//===----------------------------------------------------------------------===//

mlir/include/mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ struct SPIRVConversionOptions {
5555
/// values will be packed into one 32-bit value to be memory efficient.
5656
bool emulateLT32BitScalarTypes{true};
5757

58+
/// Use 64-bit integers to convert index types.
59+
bool use64bitIndex{false};
60+
5861
/// Whether to enable fast math mode during conversion. If true, various
5962
/// patterns would assume no NaN/infinity numbers as inputs, and thus there
6063
/// will be no special guards emitted to check and handle such cases.
6164
bool enableFastMathMode{false};
62-
63-
/// Use 64-bit integers when converting index types.
64-
bool use64bitIndex{false};
6565
};
6666

6767
/// Type conversion from builtin types to SPIR-V types for shader interface.
@@ -77,11 +77,6 @@ class SPIRVTypeConverter : public TypeConverter {
7777
/// Gets the SPIR-V correspondence for the standard index type.
7878
Type getIndexType() const;
7979

80-
/// Gets the bitwidth of the index type when converted to SPIR-V.
81-
unsigned getIndexTypeBitwidth() const {
82-
return options.use64bitIndex ? 64 : 32;
83-
}
84-
8580
const spirv::TargetEnv &getTargetEnv() const { return targetEnv; }
8681

8782
/// Returns the options controlling the SPIR-V type converter.

mlir/lib/Conversion/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ add_subdirectory(GPUToROCDL)
2424
add_subdirectory(GPUToSPIRV)
2525
add_subdirectory(GPUToVulkan)
2626
add_subdirectory(IndexToLLVM)
27-
add_subdirectory(IndexToSPIRV)
2827
add_subdirectory(LinalgToStandard)
2928
add_subdirectory(LLVMCommon)
3029
add_subdirectory(MathToFuncs)

mlir/lib/Conversion/IndexToSPIRV/CMakeLists.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)