When the device_type = kDLCPU. these code run ok.
TVMArrayAlloc(in_shape, in_ndim, dtype_code, dtype_bits, dtype_lanes, device_type, device_id, &x);
// load image data saved in binary
std::ifstream data_fin("cat.bin", std::ios::binary);
data_fin.read(static_cast<char*>(x->data), 3 * 224 * 224 * 4);
But when device_type = kDLOpenCL.these code is not work.Does anyone know how to use is right? Thank you very much!