Skip to content

Commit f85803f

Browse files
committed
remove warning message
Change-Id: Ie4e91a9b45fe6a8b22d6faed3334290b93ab27bc
1 parent affb194 commit f85803f

File tree

4 files changed

+18
-24
lines changed

4 files changed

+18
-24
lines changed

src/target/parsers/cpu.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ TargetJSON ParseTarget(TargetJSON target) {
4444
// Try to fill in the blanks by detecting target information from the system
4545
if (kind == "llvm" && !mtriple.defined() && !mcpu.defined()) {
4646
String system_triple = DetectSystemTriple().value_or("");
47-
LOG(WARNING) << "Explicit mtriple or mcpu was not provided. Using system detected mtriple: "
48-
<< system_triple << ".";
4947
target.Set("mtriple", system_triple);
5048
}
5149

tests/cpp/target_test.cc

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -503,23 +503,14 @@ TEST(TargetCreation, DetectSystemTriple) {
503503
{"kind", String("llvm")},
504504
};
505505

506-
testing::internal::CaptureStderr();
507506
Target target = Target(config);
508-
std::string cap_stderr = testing::internal::GetCapturedStderr();
509507
ICHECK_EQ(target->kind, TargetKind::Get("llvm").value());
510508

511509
Optional<String> mtriple = target->GetAttr<String>("mtriple");
512510
auto pf = tvm::runtime::Registry::Get("target.llvm_get_system_triple");
513511
if (!pf->defined()) {
514512
GTEST_SKIP() << "LLVM is not available, skipping test";
515513
}
516-
517-
ICHECK(mtriple.defined());
518-
ICHECK_EQ(mtriple.value(), String((*pf)()));
519-
std::string expected_warning_message =
520-
"Warning: Explicit mtriple or mcpu was not provided. Using system detected mtriple: " +
521-
mtriple.value();
522-
ICHECK(cap_stderr.find(expected_warning_message) != std::string::npos);
523514
}
524515

525516
TEST(TargetKindRegistry, ListTargetKinds) {

tests/python/auto_scheduler/test_auto_scheduler_search_task.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,11 @@ def test_search_task_record():
114114
assert new_task.task_input_names[1] == "test_input_1"
115115

116116
# Log with version 0.5
117-
v5_log = """["[\\\"matmul_auto_scheduler_test\\\", 64, 64, 64]", "llvm -keys=cpu", [6, 64, 64, 0, 0, 0, 0, 0], "", 1]"""
117+
v5_log = (
118+
"""["[\\\"matmul_auto_scheduler_test\\\", 64, 64, 64]", """
119+
f'"{str(tvm.target.Target(target))}"'
120+
""", [6, 64, 64, 0, 0, 0, 0, 0], "", 1]"""
121+
)
118122
new_task = auto_scheduler._ffi_api.DeserializeSearchTask(v5_log)
119123
assert task.workload_key == new_task.workload_key
120124
assert str(task.target) == str(new_task.target)
@@ -125,12 +129,13 @@ def test_search_task_record():
125129

126130
def test_recover_measure_input_with_task_input():
127131
auto_scheduler.search_task.TASK_INPUT_BUFFER_TABLE.clear()
132+
target = "llvm"
128133

129134
# Since this file is tests for search_task, we only check the search_task here
130135

131136
# Log with no task input
132137
task = auto_scheduler.SearchTask(
133-
func=matmul_auto_scheduler_test, args=(512, 512, 512), target="llvm"
138+
func=matmul_auto_scheduler_test, args=(512, 512, 512), target=target
134139
)
135140
inp = auto_scheduler.measure.MeasureInput(task, task.compute_dag.init_state)
136141
res = auto_scheduler.measure.MeasureResult([0.1], 0, "", 0.2, 1)
@@ -147,7 +152,7 @@ def test_recover_measure_input_with_task_input():
147152
task = auto_scheduler.SearchTask(
148153
func=matmul_auto_scheduler_test,
149154
args=(512, 512, 512),
150-
target="llvm",
155+
target=target,
151156
task_inputs={
152157
"test_input_0": test_input_0,
153158
},
@@ -170,7 +175,7 @@ def test_recover_measure_input_with_task_input():
170175
task = auto_scheduler.SearchTask(
171176
func=matmul_auto_scheduler_test,
172177
args=(512, 512, 512),
173-
target="llvm",
178+
target=target,
174179
task_inputs={
175180
"test_input_0": test_input_0,
176181
"test_input_1": test_input_1,
@@ -191,7 +196,11 @@ def test_recover_measure_input_with_task_input():
191196
assert new_task.task_input_names[1] == "test_input_1"
192197

193198
# Log with version 0.5
194-
v5_log = """{"i": [["[\\\"matmul_auto_scheduler_test\\\", 512, 512, 512]", "llvm -keys=cpu", [6, 64, 64, 0, 0, 0, 0, 0], "", 1], [[], []]], "r": [[0.1], 0, 0.2, 1], "v": "v0.6"}"""
199+
v5_log = (
200+
"""{"i": [["[\\\"matmul_auto_scheduler_test\\\", 512, 512, 512]", """
201+
f'"{str(tvm.target.Target(target))}"'
202+
""", [6, 64, 64, 0, 0, 0, 0, 0], "", 1], [[], []]], "r": [[0.1], 0, 0.2, 1], "v": "v0.6"}"""
203+
)
195204
measure_log = auto_scheduler.measure_record.load_record_from_string(v5_log)
196205
new_task = measure_log[0].task
197206
assert task.workload_key == new_task.workload_key

tests/python/frontend/tflite/test_forward.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5213,10 +5213,8 @@ def test_forward_tflite_float16():
52135213

52145214
@pytest.mark.skipif(
52155215
platform.machine() == "aarch64",
5216-
reason=(
5217-
"Fails during leagalization due to int16 datatype. "
5218-
"See https://github.com/apache/tvm/issues/16535",
5219-
),
5216+
reason="Fails during leagalization due to int16 datatype. "
5217+
"See https://github.com/apache/tvm/issues/16535",
52205218
)
52215219
def test_forward_mobilenet_int16():
52225220
"""Test int16 quantized model"""
@@ -5262,10 +5260,8 @@ def representative_dataset():
52625260

52635261
@pytest.mark.skipif(
52645262
platform.machine() == "aarch64",
5265-
reason=(
5266-
"Fails during leagalization due to int16 datatype. "
5267-
"See https://github.com/apache/tvm/issues/16535",
5268-
),
5263+
reason="Fails during leagalization due to int16 datatype. "
5264+
"See https://github.com/apache/tvm/issues/16535",
52695265
)
52705266
def test_forward_ds_cnn_int16():
52715267
"""Test DS_CNN int16 quantized model"""

0 commit comments

Comments
 (0)