Skip to content

Commit 96bbe47

Browse files
authored
Revert "[mlir][spirv] Fix int type declaration duplication when serializing" and follow up commits (#144773)
This reverts the following PRs: * #143108 * #144538 * #144685 Reverting because this disabled tests when building without the llvm spirv backend enabled.
1 parent a88e655 commit 96bbe47

File tree

7 files changed

+2
-35
lines changed

7 files changed

+2
-35
lines changed

mlir/lib/Target/SPIRV/Serialization/Serializer.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -446,19 +446,6 @@ LogicalResult Serializer::processType(Location loc, Type type,
446446
LogicalResult
447447
Serializer::processTypeImpl(Location loc, Type type, uint32_t &typeID,
448448
SetVector<StringRef> &serializationCtx) {
449-
450-
// Map unsigned integer types to singless integer types.
451-
// This is needed otherwise the generated spirv assembly will contain
452-
// twice a type declaration (like OpTypeInt 32 0) which is no permitted and
453-
// such module fails validation. Indeed at MLIR level the two types are
454-
// different and lookup in the cache below misses.
455-
// Note: This conversion needs to happen here before the type is looked up in
456-
// the cache.
457-
if (type.isUnsignedInteger()) {
458-
type = IntegerType::get(loc->getContext(), type.getIntOrFloatBitWidth(),
459-
IntegerType::SignednessSemantics::Signless);
460-
}
461-
462449
typeID = getTypeID(type);
463450
if (typeID)
464451
return success();

mlir/test/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ endif()
6868
llvm_canonicalize_cmake_booleans(
6969
LLVM_BUILD_EXAMPLES
7070
LLVM_HAS_NVPTX_TARGET
71-
LLVM_INCLUDE_SPIRV_TOOLS_TESTS
7271
MLIR_ENABLE_BINDINGS_PYTHON
7372
MLIR_ENABLE_CUDA_RUNNER
7473
MLIR_ENABLE_ROCM_CONVERSIONS
@@ -218,11 +217,6 @@ if(MLIR_ENABLE_BINDINGS_PYTHON)
218217
)
219218
endif()
220219

221-
if (LLVM_INCLUDE_SPIRV_TOOLS_TESTS)
222-
list(APPEND MLIR_TEST_DEPENDS spirv-as)
223-
list(APPEND MLIR_TEST_DEPENDS spirv-val)
224-
endif()
225-
226220
# This target can be used to just build the dependencies
227221
# for the check-mlir target without executing the tests.
228222
# This is useful for bots when splitting the build step

mlir/test/Target/SPIRV/constant.mlir

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// RUN: mlir-translate --no-implicit-module --test-spirv-roundtrip %s | FileCheck %s
2-
// RUN: %if spirv-tools %{ mlir-translate -no-implicit-module -serialize-spirv %s | spirv-val %}
32

4-
spirv.module Logical Vulkan requires #spirv.vce<v1.3, [VulkanMemoryModel, Shader, Int64, Int16, Int8, Float64, Float16, CooperativeMatrixKHR], [SPV_KHR_vulkan_memory_model, SPV_KHR_cooperative_matrix]> {
3+
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
54
// CHECK-LABEL: @bool_const
65
spirv.func @bool_const() -> () "None" {
76
// CHECK: spirv.Constant true
@@ -306,6 +305,4 @@ spirv.module Logical Vulkan requires #spirv.vce<v1.3, [VulkanMemoryModel, Shader
306305
%coop = spirv.Constant dense<4> : !spirv.coopmatrix<16x16xi8, Subgroup, MatrixAcc>
307306
spirv.ReturnValue %coop : !spirv.coopmatrix<16x16xi8, Subgroup, MatrixAcc>
308307
}
309-
310-
spirv.EntryPoint "GLCompute" @bool_const
311308
}

mlir/test/Target/SPIRV/lit.local.cfg

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

mlir/test/lit.cfg.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,6 @@ def find_real_python_interpreter():
332332
else:
333333
config.available_features.add("noasserts")
334334

335-
config.targets = frozenset(config.targets_to_build.split())
336335

337336
def have_host_jit_feature_support(feature_name):
338337
mlir_runner_exe = lit.util.which("mlir-runner", config.mlir_tools_dir)

mlir/test/lit.site.cfg.py.in

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import sys
55
config.target_triple = "@LLVM_TARGET_TRIPLE@"
66
config.llvm_src_root = "@LLVM_SOURCE_DIR@"
77
config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
8-
config.spirv_tools_tests = @LLVM_INCLUDE_SPIRV_TOOLS_TESTS@
9-
config.targets_to_build = "@TARGETS_TO_BUILD@"
108
config.llvm_shlib_ext = "@SHLIBEXT@"
119
config.llvm_shlib_dir = lit_config.substitute(path(r"@SHLIBDIR@"))
1210
config.python_executable = "@Python3_EXECUTABLE@"
@@ -43,7 +41,7 @@ config.mlir_run_amx_tests = @MLIR_RUN_AMX_TESTS@
4341
config.mlir_run_arm_sve_tests = @MLIR_RUN_ARM_SVE_TESTS@
4442
# This is a workaround for the fact that LIT's:
4543
# %if <cond>
46-
# requires <cond> to be in the set of available features.
44+
# requires <cond> to be in the set of available features.
4745
# TODO: Update LIT's TestRunner so that this is not required.
4846
if config.mlir_run_arm_sve_tests:
4947
config.available_features.add("mlir_arm_sve_tests")

utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ expand_template(
3737
# All disabled, but required to substituted because they are not in quotes.
3838
"@LLVM_BUILD_EXAMPLES@": "0",
3939
"@LLVM_HAS_NVPTX_TARGET@": "0",
40-
"@LLVM_INCLUDE_SPIRV_TOOLS_TESTS@": "0",
4140
"@MLIR_ENABLE_CUDA_RUNNER@": "0",
4241
"@MLIR_ENABLE_ROCM_CONVERSIONS@": "0",
4342
"@MLIR_ENABLE_ROCM_RUNNER@": "0",

0 commit comments

Comments
 (0)