Schedule two computations together #7723
Unanswered
cordovan66
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sorry for the long post but I'm a beginner and have been struggling for a few days.
I'm trying to schedule an algorithm so I can compute two quantities in a single pass through the input data. I have it working in two passes but want to make it faster. I pared my program down to only keep salient structures that may be important for the schedule. I'm computing G2 and P2 which are defined as the gaussian filtered versions of G * G and P * P respectively where G and P are input color images.
Gb is the repeat_edge version of G.
G2t is Gb*Gb
G2 is Gaussian filtered G2t
Similarly for P, Pb, P2t, P2
Gaussian filtering is done in a separable way.
I define Q=G2+8 and M=P2+3 and output = Q+M. These are simple placeholders for the actual computations in my program which is why I have not simply combined them. For example output=Q+M is a placeholder for a complicated operation that needs Q and M defined on identical domains.
The working schedules for Q and M parallelize, vectorize and unroll as shown. I've been trying for a few days to schedule P and Q in the same loop structure so it wouldn't have to go through the input data twice but nothing has worked. I tried
M.compute_at(Q,x) and M.compute_with(Q,x) and many versions of these but get "computed at invalid location" errors.
Here's the Generator code
Beta Was this translation helpful? Give feedback.
All reactions