-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
autoschedulerRelated to one or more of the AutoschedulersRelated to one or more of the AutoschedulersbuildIssues related to building Halide and with CIIssues related to building Halide and with CI
Description
I was wondering can I do auto scheduling for GPUs?
I have simple halide code:
for (int y = 0; y < size; y++) {
for (int x = 0; x < size; x++) {
A(x, y) = rand() & 0xfff;
}
}
Var j("j"), i("i"), k("k");
Func out4("out4");
out4(i, j) = A(i, j) * 2;
Target target = get_target_from_environment();
target.set_feature(Halide::Target::CUDACapability35);
target.set_feature(Halide::Target::CUDA);
Pipeline p(out4);
out4.estimate(i, 0, size).estimate(j, 0, size);
cout << p.auto_schedule(target);I get schedule:
// Target: x86-64-linux-avx-avx2-cuda-cuda_capability_35-f16c-fma-sse41
// MachineParams: 16,16777216,40
Var i_vi("i_vi");
Var i_vo("i_vo");
Func out4 = pipeline.get_func(0);
{
Var i = out4.args()[0];
Var j = out4.args()[1];
out4
.compute_root()
.split(i, i_vo, i_vi, 8)
.vectorize(i_vi)
.parallel(j);
}Now even though the Target has feature: cuda, the code is not running on GPU.
Am I missing something?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
autoschedulerRelated to one or more of the AutoschedulersRelated to one or more of the AutoschedulersbuildIssues related to building Halide and with CIIssues related to building Halide and with CI