尝试官方 TVM 教程时出现"找不到目标 = opencl -设备intel_graphics -模型=未知,工作负载=' 的配置"错误



我正在尝试在 TVM 中运行第一个示例,但在一开始我就遇到了这些错误。我已经使用LLVM ONOpenCL On构建了 tvm(安装了用于 opencl 应用程序的英特尔 sdk - opencl 2.1(。构建过程顺利进行,所以我想一切都到位了。

但是,当我尝试从此示例中运行此代码片段时,我收到这些错误: 编译深度学习模型的快速入门教程:

opt_level = 3
target = tvm.target.intel_graphics()
with relay.build_config(opt_level=opt_level):
graph, lib, params = relay.build_module.build(
mod, target, params=params)

Cannot find config for target=opencl -device=intel_graphics -model=unknown, workload=('conv2d', (1, 3, 224, 224, 'float32'), (64, 3, 7, 7, 'float32'), (2, 2), (3, 3), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=unknown, workload=('conv2d', (1, 64, 56, 56, 'float32'), (64, 64, 3, 3, 'float32'), (1, 1), (1, 1), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=unknown, workload=('conv2d', (1, 64, 56, 56, 'float32'), (64, 64, 1, 1, 'float32'), (1, 1), (0, 0), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=unknown, workload=('conv2d', (1, 64, 56, 56, 'float32'), (128, 64, 3, 3, 'float32'), (2, 2), (1, 1), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=unknown, workload=('conv2d', (1, 128, 28, 28, 'float32'), (128, 128, 3, 3, 'float32'), (1, 1), (1, 1), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=unknown, workload=('conv2d', (1, 64, 56, 56, 'float32'), (128, 64, 1, 1, 'float32'), (2, 2), (0, 0), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=unknown, workload=('conv2d', (1, 128, 28, 28, 'float32'), (256, 128, 3, 3, 'float32'), (2, 2), (1, 1), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=unknown, workload=('conv2d', (1, 256, 14, 14, 'float32'), (256, 256, 3, 3, 'float32'), (1, 1), (1, 1), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=unknown, workload=('conv2d', (1, 128, 28, 28, 'float32'), (256, 128, 1, 1, 'float32'), (2, 2), (0, 0), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=unknown, workload=('conv2d', (1, 256, 14, 14, 'float32'), (512, 256, 3, 3, 'float32'), (2, 2), (1, 1), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=unknown, workload=('conv2d', (1, 512, 7, 7, 'float32'), (512, 512, 3, 3, 'float32'), (1, 1), (1, 1), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=unknown, workload=('conv2d', (1, 256, 14, 14, 'float32'), (512, 256, 1, 1, 'float32'), (2, 2), (0, 0), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=unknown, workload=('dense', (1, 512, 'float32'), (1000, 512, 'float32'), 0, 'float32'). A fallback configuration is used, which may bring great performance regression.

我还尝试发送图形模型以查看这是否是原因,但无济于事!我仍然收到相同的错误消息,这次使用我提供的模型,即:

opt_level = 3
target = tvm.target.intel_graphics(model='Intel(R) Iris(R) Pro Graphics 580')
with relay.build_config(opt_level=opt_level):
graph, lib, params = relay.build_module.build(
mod, target, params=params)

Cannot find config for target=opencl -device=intel_graphics -model=Intel(R) Iris(R) Pro Graphics 580, workload=('conv2d', (1, 3, 224, 224, 'float32'), (64, 3, 7, 7, 'float32'), (2, 2), (3, 3), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=Intel(R) Iris(R) Pro Graphics 580, workload=('conv2d', (1, 64, 56, 56, 'float32'), (64, 64, 3, 3, 'float32'), (1, 1), (1, 1), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=Intel(R) Iris(R) Pro Graphics 580, workload=('conv2d', (1, 64, 56, 56, 'float32'), (64, 64, 1, 1, 'float32'), (1, 1), (0, 0), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=Intel(R) Iris(R) Pro Graphics 580, workload=('conv2d', (1, 64, 56, 56, 'float32'), (128, 64, 3, 3, 'float32'), (2, 2), (1, 1), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=Intel(R) Iris(R) Pro Graphics 580, workload=('conv2d', (1, 128, 28, 28, 'float32'), (128, 128, 3, 3, 'float32'), (1, 1), (1, 1), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=Intel(R) Iris(R) Pro Graphics 580, workload=('conv2d', (1, 64, 56, 56, 'float32'), (128, 64, 1, 1, 'float32'), (2, 2), (0, 0), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=Intel(R) Iris(R) Pro Graphics 580, workload=('conv2d', (1, 128, 28, 28, 'float32'), (256, 128, 3, 3, 'float32'), (2, 2), (1, 1), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=Intel(R) Iris(R) Pro Graphics 580, workload=('conv2d', (1, 256, 14, 14, 'float32'), (256, 256, 3, 3, 'float32'), (1, 1), (1, 1), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=Intel(R) Iris(R) Pro Graphics 580, workload=('conv2d', (1, 128, 28, 28, 'float32'), (256, 128, 1, 1, 'float32'), (2, 2), (0, 0), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=Intel(R) Iris(R) Pro Graphics 580, workload=('conv2d', (1, 256, 14, 14, 'float32'), (512, 256, 3, 3, 'float32'), (2, 2), (1, 1), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=Intel(R) Iris(R) Pro Graphics 580, workload=('conv2d', (1, 512, 7, 7, 'float32'), (512, 512, 3, 3, 'float32'), (1, 1), (1, 1), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=Intel(R) Iris(R) Pro Graphics 580, workload=('conv2d', (1, 256, 14, 14, 'float32'), (512, 256, 1, 1, 'float32'), (2, 2), (0, 0), (1, 1), 'NCHW', 'float32'). A fallback configuration is used, which may bring great performance regression.
Cannot find config for target=opencl -device=intel_graphics -model=Intel(R) Iris(R) Pro Graphics 580, workload=('dense', (1, 512, 'float32'), (1000, 512, 'float32'), 0, 'float32'). A fallback configuration is used, which may bring great performance regression.

我什至尝试更改op_level,这不会影响任何事情。我应该怎么做才能摆脱这个问题?

您看到的不是错误,而是警告。由于 TVM 找不到包含优化计划的日志文件,因此它将仅使用默认(回退(计划。

要消除警告,您需要使用 AutoTVM(如本例所示(来查找优化的计划。之后,您可以继续编译。

相关内容

最新更新