How to get rid of -target is deprecated?

Hello, how do I get rid of this annoying warning?

“-target” is deprecated, use “-mtriple” instead.

As target I use:‘rasp3b’)


How can I fix this?


This has been fixed on July 5th so you can get rid of it by simply using the latest commit.

1 Like

Thank you very much. So far I have worked with the release 0.7 branch and did not noticed that it is already fixed. :sweat_smile:

Thank you :grinning:

This is a notable point. Maybe we should backport this PR to the 0.7.1 release.

cc @junrushao1994

I agree. @comaniac would you like to send a backport PR? Thanks!

It turns out that the v0.7 release already includes this PR, so we are good.

However, when it is included in the v0.7 release shouldn’t the warning disappear? I am at the current head of v0.7 branch 5eb56a99c0fabae02671298f10c6222e75966bb. Any idea why I still see the warning?

I have no clue. Here shows that we already use -mtriple instead of -target for Rasp targets in the v0.7 HEAD. Maybe checking out a clean clone can resolve your issue.

It is a fresh checkout only two 2 days old. And yes in my I see the usage of mtriple terminology. When you run some raspberry pi code are you free of warnings?

I tried the following but nothing happened.

>>> import tvm
llvm -keys=arm_cpu,cpu -device=arm_cpu -mattr=+neon -mcpu=cortex-a72 -model=bcm2711 -mtriple=armv8l-linux-gnueabihf

Would you provide a minimal reproducible script?

I cannot repro your warning either. It should work without any warnings on HEAD

@comaniac if I only run the two lines from above no error occurs, but later when the target is used it does. A test script that throws this warning on my setup is attached. The line with C = fcompute(...) raises the warning.

import numpy as np
import tvm
import tvm.topi as topi
import tvm.topi.testing
from tvm import te

# select target CPU'rasp3b')'rasp4b')

_conv2d_nchw_implement = {
    "llvm": (topi.nn.conv2d_nchw, topi.generic.schedule_conv2d_nchw),
    "cuda": (topi.cuda.conv2d_nchw, topi.cuda.schedule_conv2d_nchw),
    "cpu": (topi.nn.conv2d_nchw, topi.x86.schedule_conv2d_nchw),
    "arm_cpu": (topi.arm_cpu.conv2d_nchw_spatial_pack, topi.arm_cpu.schedule_conv2d_nchw_spatial_pack),
    "hls": (topi.nn.conv2d_nchw, topi.hls.schedule_conv2d_nchw)
    # see:

A = te.placeholder((1, 64, 56, 56), name='A', dtype=dtype)
W = te.placeholder((64, 64, 3, 3), name='W', dtype=dtype)

# create schedule
with target:
    fcompute, fschedule = topi.testing.dispatch(target, _conv2d_nchw_implement)
    #C = fcompute(A, W, stride, pad, (dilation,dilation), dtype)
    C = fcompute(A, W, (1,1), (1,1,1,1), (1,1), dtype)
    s = fschedule([C])
    # build
    func =, [A, W, C], target)

Well, then you’re talking about a completely different problem…

Your warnings come from the TopHub records:

And this PR updates the use of TopHub version:


Ok. I am not sure I understand what happens and sorry for the confusion. I will take a deeper look into it tomorrow.

Thank you for your great help. :slight_smile:

When you’re building a module, TVM is seeking for a schedule config to apply to each operator. If you don’t use AutoTVM to tune the operators and have the tuning logs on hand, then TVM will use the default schedules that the community tuned and released on GitHub, called TopHub. Since the schedule records on TopHub were still using -target, you will see lots of warnings when TVM loads them. I’ve filed a PR to back port it to v0.7 to fix this.

1 Like

Ok, now I get it. And because I always do a runtime measurement before I start the AutoTVM tuning to have a baseline to compare to, I always get this warnings since the first run is without parameter file.