Question about Target option


I have some questions about tvm.Target option.

In many tutorials and answer, I got some example like (target = “llvm -mcpu=cascadelake” ,etc…)

But i can not find a properly organized document.

Where can I find that?

  1. target option -mcpu, -mattr, -libs … etc

Hi, @gnup84. So far as I can tell, there is no document to list which target currently supports.

I think one way to list it is by TVMC, which should have this function to show the list of supported targets like

python3 -m tvm compile --target --help

You can find the target registration at tvm/ at 5688068eb02912a4ec926a88f5cad3f0f370454e · apache/tvm · GitHub


Thanks you so much…

I tested many options.

then i catch the weird situations.

target = “llvm -mcpu=cascadelake -libs=mkl”

if i set a option to use mkl like above, the inference time is slower than not use mkl.

not use mkl = 12ms use mkl = 87ms

This post says set(USE_OPENMP intel or gnu) can improve the inference time.

In this case, inference time is 16ms. // use_openmp and mkl But still slow…

I think that using mkl is more fast than not use.

Why this happen??

  1. Why using MKL is more slow than base.
  2. What is the relationship between the openmp, mkl? *** model = resnet50, bacth_size = 1, model in relay.testing

tvmc doesn’t have this specific functionality right now. I’ve been thinking on how we could make the Targets to self-describe, by adding a text description field and API to pull information about a target. That would be great for usability of TVMC, but right now, we can’t collect that information.

You can collect the list of existing targets in Python, by using this API call:

import tvm

targets =

source: Make the TVM targets list available in Python by NicolaLancellotti · Pull Request #7427 · apache/tvm · GitHub