Replies: 3 comments
-
Can you provide more information about the question? I do not really understand it. |
Beta Was this translation helpful? Give feedback.
0 replies
-
func (b *gridBuilderImpl) formWavefronts(wg *WorkGroup) {
var wf *Wavefront
wavefrontSize := 64
for i, wi := range wg.WorkItems {
wg := wi.WG
inWGID := wi.IDZ*wg.SizeX*wg.SizeY + wi.IDY*wg.SizeX + wi.IDX
wi.extraFunction(inWGID)
if inWGID%wavefrontSize == 0 {
wf = NewWavefront()
wf.FirstWiFlatID = wg.WorkItems[i].FlattenedID()
wf.CodeObject = b.hsaco
wf.Packet = b.packet
wf.PacketAddress = b.packetAddr
wf.WG = wg
wg.Wavefronts = append(wg.Wavefronts, wf)
}
wf.WorkItems = append(wf.WorkItems, wi)
wf.InitExecMask |= 1 << uint32(inWGID%wavefrontSize)
}
}
type WorkItem struct {
WG *WorkGroup
IDX, IDY, IDZ int
}
func (wi *WorkItem) extraFunction(a int) {
if a%64 == 63 {
....
}
} I'm trying to periodically add some functions to some workitems in the |
Beta Was this translation helpful? Give feedback.
0 replies
-
I still do not understand what you want to do here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Mr. Author, how do I get the currently running Context object in the NextWG method in gridbuilder.go ?
Beta Was this translation helpful? Give feedback.
All reactions