Skip to content
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] some vector schedules cause LLVM error #7158

Closed
miles-rusch-berkeley opened this issue Nov 9, 2022 · 3 comments
Closed

[RISC-V] some vector schedules cause LLVM error #7158

miles-rusch-berkeley opened this issue Nov 9, 2022 · 3 comments

Comments

@miles-rusch-berkeley
Copy link

matrix_multiplication.cpp.zip

the following vectorization schedule, defined in line 47, causes an error when compiling to RISCv Vector but not when compiling to ARM SVE:

//ISSUE: no llvm error if we replace y with x in the following line:
out.vectorize(y, vlen/arch_bits);
@miles-rusch-berkeley
Copy link
Author

The error message is:

Intrinsic name not mangled correctly for type arguments! Should be: llvm.experimental.vp.strided.store.nxv4f32.p0.i64 ptr @llvm.experimental.vp.strided.store.nxv4f32.p0.v32781f64 Internal Error at /Users/milesrusch/Documents/risc-v/rvv/llvm15/Halide/src/CodeGen_LLVM.cpp:632 triggered by user code at : Condition failed: !verifyFunction(*function, &llvm::errs()):

matrix_multiplication.cpp.zip

@miles-rusch-berkeley miles-rusch-berkeley changed the title some schedules cause LLVM error [RISC-V] some vector schedules cause LLVM error Nov 30, 2022
@zvookin
Copy link
Member

zvookin commented Dec 7, 2022

Fixed in #7212 .

@zvookin zvookin closed this as completed Dec 7, 2022
@miles-rusch-berkeley
Copy link
Author

miles-rusch-berkeley commented Dec 9, 2022

After pulling main with the patch, I am now getting a similar error:

% g++ gaussian_blur_gen.cpp -g -std=c++17 -I includeHalide -L libHalide -lHalide -o gaussian_blur_gen
% DYLD_LIBRARY_PATH=libHalide ./gaussian_blur_gen
...
Intrinsic name not mangled correctly for type arguments! Should be: llvm.vector.insert.nxv8i8.nxv4i8
ptr @llvm.vector.insert.nxv8i8.v32i8
...
Intrinsic name not mangled correctly for type arguments! Should be: llvm.vector.insert.nxv8i8.nxv4i8
ptr @llvm.vector.insert.nxv8i8.v32i8
Internal Error at /Users/milesrusch/Documents/risc-v/rvv/llvm15/Halide/src/CodeGen_LLVM.cpp:632 triggered by user code at :
Condition failed: !verifyFunction(*function, 
[gaussian_blur_gen.cpp.zip](https://github.com/halide/Halide/files/10192566/gaussian_blur_gen.cpp.zip)
&llvm::errs()):
zsh: abort      DYLD_LIBRARY_PATH=libHalide ./$1_gen

gaussian_blur_gen.cpp.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants