Target-specific registration in C++


#1

Lets take example of AlterOpLayout. Currently, if we want to tag a function to run on specific targets, we can do that in Python. For example, we can use register("cpu") to trigger this function only for Intel CPUs.

Is there a way to do the same in C++?

@yzhliu @tqchen @zhiics


#2

It looks to me that we don’t, right? We pass target to schedule and compute.


#3

Duplicate - [DISCUSS] Target dispatch in C++


#4

C++ has this functionality in TOPI. See topi.cc for generic function registration. However, the schedule part confused me - Python schedules don’t take in a target argument, but C++ ones do.