-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RISC-V] Intrinsic has incorrect return type! (@llvm.vp.fcmp.nxv2f32, @llvm.vp.select.nxv2i32) #7173
Comments
If I understand correctly, currently generated by Halide:
but not
Update: see proposal in #7183 |
One more similar error:
Reproducer (RGB to Grayscale)#include <Halide.h>
using namespace Halide;
const int width = 640;
const int height = 480;
int main(int argc, char** argv) {
uint16_t R2GRAY = 77, G2GRAY = 150, B2GRAY = 29;
std::vector<uint8_t> src(width * height * 3);
std::vector<uint8_t> dst(width * height);
Func f("rgb2gray");
auto input = Buffer<uint8_t>::make_interleaved(src.data(), width, height, 3);
Var x("x"), y("y");
Expr r = cast<uint16_t>(input(x, y, 0));
Expr g = cast<uint16_t>(input(x, y, 1));
Expr b = cast<uint16_t>(input(x, y, 2));
f(x, y) = cast<uint8_t>((R2GRAY * r + G2GRAY * g + B2GRAY * b) >> 8);
Var yo("yo"), yi("yi");
f.split(y, yo, yi, 64)
.parallel(yo)
.vectorize(x, 8);
Target target = get_host_target();
target.vector_bits = 8 * sizeof(uint8_t) * 8;
std::vector<Target::Feature> features;
features.push_back(Target::RVV);
target.set_features(features);
std::cout << target << std::endl;
f.print_loop_nest();
Buffer<uint8_t> output(dst.data(), {width, height});
f.realize(output, target);
} Fails only on
Is See proposal at #7192 |
Hi, @zvookin, I am getting another similar error when vectorizing and using the function
file that reproduces error with the above commands attached: |
@miles-rusch-berkeley, in llvm/llvm-project#59252 it's recommended to add |
Hi @dkurt , thanks for your help. Where can I add this flag? Right now I am just using g++ to compile my pipeline to a static library, and I don't see how to control the |
I should have a PR up shortly to fix both the icmp and select issues. The zvl flag would get added in |
Fix is in #7205 . |
Should be fixed in main now. |
Thanks, @zvookin! Yes, both exceptions now fixed on the main branch. Remaining
I hope llvm/llvm-project#59252 (comment) may help. |
Hi, @zvookin! Trying RISC-V, got the following error on specific algorithm of Max pooling deep learning layer. Reproduced only with
.vectorize
applied.LLVM: 15.0.2
Reproducer
If I use just
top(x, y, c, n) = maximum(input(kx, ky, c, n))
:The text was updated successfully, but these errors were encountered: