You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adams2019 issues segmentation fault with Halide generator class below:
#include "Halide.h"
#include <stdio.h>
using namespace Halide;
class mMatmul_matmul_out1_fcn_halide_generator : public Halide::Generator <mMatmul_matmul_out1_fcn_halide_generator> {
public:
Input<Buffer<uint8_t>> A1_in{"A1_in", 2};
Input<Buffer<uint8_t>> B1_in{"B1_in", 2};
Output<Buffer<uint16_t>> matmul_out1_fcn{"matmul_out1_fcn", 2};
void generate() {
RDom r(0, 81);
matmul_out1_func(d1, d2) = sum(cast<uint16_t>(A1_in(d1, r))*cast<uint16_t>(B1_in(r, d2)));
matmul_out1_fcn(d1, d2) = matmul_out1_func(d1, d2);
}
void schedule() {
// Schedule is determined by autoscheduler. Need to set estimate on buffer
if(using_autoscheduler()) {
A1_in.dim(1).set_estimate(0, 81);
A1_in.dim(0).set_estimate(0, 81);
B1_in.dim(1).set_estimate(0, 81);
B1_in.dim(0).set_estimate(0, 81);
matmul_out1_fcn.set_estimate(d1, 0, 81).set_estimate(d2, 0, 81);
} else {
// Default schedule
}
}
private:
Var d1{"d1"};
Var d2{"d2"};
Func matmul_out1_func{"matmul_out1_func"};
I used binary 'Halide-18.0.0-x86-64-linux-b741d9c5b2705c45fd7c8462eb0b4bfa35a3e6d8.tar.gz' downloaded from: https://buildbot.halide-lang.org/
My command for compiling the Halide Genertor Class is:
$ g++ mMatmul_matmul_out1_fcn_halide.cpp -std=c++17 ....../Halide-18.0.0-x86-64-linux/share/Halide/tools/GenGen.cpp -L ....../Halide-18.0.0-x86-64-linux/lib -lHalide -I ....../Halide-18.0.0-x86-64-linux/include -o mMatmul_matmul_out1_fcn_halide
My command for running generator with Adams2019 is:
$ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:....../Halide-18.0.0-x86-64-linux/lib
$ ./mMatmul_matmul_out1_fcn_halide -f myPipeline -g mMatmul_matmul_out1_fcn_halide_gen -e h,o target=hexagon-32-noos-hvx-no_runtime autoscheduler.parallelism=2 autoscheduler=Adams2019 -p ....../Halide-18.0.0-x86-64-linux/lib/libautoschedule_adams2019.so -o ./
I have the following observations:
If I make the RDom length and the length used in set_estimate less than or equal to 80, the segmentation fault will disappear.
If I change the output buffer type from uint16_t to uint8_t and remove the two 'cast' in generate function, the segmentation fault will disappear.
The text was updated successfully, but these errors were encountered:
Adams2019 issues segmentation fault with Halide generator class below:
#include "Halide.h"
#include <stdio.h>
using namespace Halide;
class mMatmul_matmul_out1_fcn_halide_generator : public Halide::Generator <mMatmul_matmul_out1_fcn_halide_generator> {
};
HALIDE_REGISTER_GENERATOR(mMatmul_matmul_out1_fcn_halide_generator, mMatmul_matmul_out1_fcn_halide_gen)
I used binary 'Halide-18.0.0-x86-64-linux-b741d9c5b2705c45fd7c8462eb0b4bfa35a3e6d8.tar.gz' downloaded from: https://buildbot.halide-lang.org/
My command for compiling the Halide Genertor Class is:
$ g++ mMatmul_matmul_out1_fcn_halide.cpp -std=c++17 ....../Halide-18.0.0-x86-64-linux/share/Halide/tools/GenGen.cpp -L ....../Halide-18.0.0-x86-64-linux/lib -lHalide -I ....../Halide-18.0.0-x86-64-linux/include -o mMatmul_matmul_out1_fcn_halide
My command for running generator with Adams2019 is:
$ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:....../Halide-18.0.0-x86-64-linux/lib
$ ./mMatmul_matmul_out1_fcn_halide -f myPipeline -g mMatmul_matmul_out1_fcn_halide_gen -e h,o target=hexagon-32-noos-hvx-no_runtime autoscheduler.parallelism=2 autoscheduler=Adams2019 -p ....../Halide-18.0.0-x86-64-linux/lib/libautoschedule_adams2019.so -o ./
I have the following observations:
The text was updated successfully, but these errors were encountered: