尝试了本教程compilation.html在x86主机(Ubuntu20.04)上,但是对于RISC目标体系结构。不幸的是,IR.cpp有一个例外。只有在应用.vectorize(x, 16)时才会出现异常,因此在RISC矢量化支持中存在问题。有什么办法来调试这个吗?
Internal Error at /home/dkurt/Halide/src/IR.cpp:272 triggered by user code at : Condition failed: lanes > 1: Ramp of lanes <= 1x86目标在本地一切正常。
#include "Halide.h"
using namespace Halide;
int main(int argc, char** argv) {
Func brighter;
Var x, y;
Param<uint8_t> offset;
ImageParam input(type_of<uint8_t>(), 2);
std::vector<Argument> args(2);
args[0] = input;
args[1] = offset;
brighter(x, y) = input(x, y) + offset;
brighter.bound(x, 0, 64).bound(y, 0, 64);
brighter.vectorize(x, 16).parallel(y);
Target target;
target.os = Target::Linux;
target.arch = Target::RISCV;
target.bits = 64;
std::vector<Target::Feature> features;
features.push_back(Target::RVV);
target.set_features(features);
try {
brighter.compile_to_static_library("compiled", args, "brighter", target);
} catch(Halide::InternalError& ex) {
std::cout << ex.what() << std::endl;
}
}发布于 2022-10-12 12:21:10
通过切换到自定义分支来解决问题。见https://github.com/halide/Halide/issues/7070。
https://stackoverflow.com/questions/73972211
复制相似问题