Not exactly, I have a function that turns a gameboard encoded in a char[] into a {4, 15, 15} shaped tensor. so what I do is in a loop that iterates through many many different states of the gameboard, call my function to get a tensor then call forward on it. (Every tensor being called forward on is one of shape {1, 4, 15, 15})
I save these char[] for after the game for the learning phase where I recreate the tensor but now in a {batchSize, 4, 15, 15} where only now do I compare with a target and get the loss and step on my optimizer.
But my situation is, if I have 1 thread calling forward on board states sequentially, that has the same gpu utilization as 4 threads calling forward on different board states in parallel. However if I have 2 instances of my .exe running. my GPU utilization doubles so I know there’s headroom on my gpu hardware for more expansion.