Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions tests/cpp/target/parsers/aprofile_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,12 @@ TEST_F(AProfileParser, DefaultSVESupportSVESupport) {
TargetJSON target = ParseTargetWithAttrs("", "aarch64-arm-none-eabi", {arch_attr});
TargetFeatures features = Downcast<TargetFeatures>(target.at("features"));
EXPECT_TRUE(IsArch(target));
#if TVM_LLVM_VERSION >= 190
// The generic aarch64 should not have SVE enabled
EXPECT_FALSE(Downcast<Bool>(features.at("has_sve")));
#else
EXPECT_TRUE(Downcast<Bool>(features.at("has_sve")));
#endif

// Check that the "has_sve" feature is set when "+sve" is explicitly set as an attribute.
target = ParseTargetWithAttrs("", "aarch64-arm-none-eabi", {arch_attr, "+sve"});
Expand Down Expand Up @@ -359,7 +364,12 @@ TEST_F(AProfileParser, DefaultFP16Support) {
TargetJSON target = ParseTargetWithAttrs("", "aarch64-arm-none-eabi", {arch_attr});
TargetFeatures features = Downcast<TargetFeatures>(target.at("features"));
EXPECT_TRUE(IsArch(target));
#if TVM_LLVM_VERSION >= 190
// The generic aarch64 should not have FP16 enabled
EXPECT_FALSE(Downcast<Bool>(features.at("has_fp16_simd")));
#else
EXPECT_TRUE(Downcast<Bool>(features.at("has_fp16_simd")));
#endif

// Check that the "has_fp16_simd" feature is set when "+fullfp16" is explicitly set as an
// attribute.
Expand Down
15 changes: 12 additions & 3 deletions tests/cpp/tir_scalable_datatype.cc
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,21 @@ TEST(ScalableDataType, TestScalableUInt) {
#if TVM_LLVM_VERSION >= 130
TEST(ScalableDataType, TestScalableIntrinCall) {
tvm::DataType scalable_type = tvm::DataType(kDLInt, 32, 4, true);
tvm::tir::Call call = tvm::tir::Call(
scalable_type, tvm::tir::builtin::call_llvm_intrin(),
{tvm::IntImm(tvm::DataType::Int(32), ::llvm::Intrinsic::experimental_stepvector)});
tvm::tir::Call call =
tvm::tir::Call(scalable_type, tvm::tir::builtin::call_llvm_intrin(),
#if TVM_LLVM_VERSION >= 200
{tvm::IntImm(tvm::DataType::Int(32), ::llvm::Intrinsic::stepvector)});
#else
{tvm::IntImm(tvm::DataType::Int(32),
::llvm::Intrinsic::experimental_stepvector)});
#endif
ASSERT_EQ(call->dtype, scalable_type);
ASSERT_EQ(call->Script(),
#if TVM_LLVM_VERSION >= 200
"T.call_llvm_intrin(\"int32xvscalex4\", \"llvm.stepvector\")");
#else
"T.call_llvm_intrin(\"int32xvscalex4\", \"llvm.experimental.stepvector\")");
#endif
}
#endif

Expand Down
Loading