Target-specific registration in C++

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

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

Duplicate - [DISCUSS] Target dispatch in C++

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.