Good question from four years ago, anyone know the answer? https://bitcoin.stackexchange.com/q/100221/4948
Discussion
Also this one from ten years ago: https://bitcoin.stackexchange.com/questions/28392/gpu-mining-strategies-algorithm
The second question is basically what made GPU mining more efficient than CPU mining. The existing answers suggests part of the answer is unknown, because there's proprietary manufacturer code involved.
The first question is about whether GPU can still be useful for the remaining sha256 usage in block validation. My guess is no because CPU specialized instructions are good enough for that.
But if the answer is yes, maybe on Apple Silicon with its shared GPU & CPU memory, maybe there's still some opportunity?
I have no idea. Useful to document.
Not sure how much credence to give to LLM hallucinations for these very specific technical questions.
the sources are linked
You could execute n different hashes depending how many different cores the GPU has. You cannot, however, break down and parallelize the computation of a single hash for what I know.
But I assume no GPU has specialized sha256 instructions, so even if you run many hashes in parallel it might not be faster.
Depends on how many cores you have. If you think about it that's why ASICs exist.
If someone managed to break down the Sha-256 update into a matrix multiplication then a GPU would be MUCH quicker.
But afaik it isn't.
Maybe it's not actually faster, but just much more energy efficient. Combined with massive parallelism the end result is more hashes per Joule.
But hopefully we don't have to guess and someone who actually implemented this can explain it all on stack exchange.
No, but I'm pretty sure a single hash would be slower in any case with all the time spent getting the data to the GPU and getting back the result. Mining is kind of unique, because you can really massively parallelize the hashing. Maybe you could parallelize the required hash work between the various scripts in a block and e.g. pre-compute the required sighashes in parallel. For merkle trees it is a bit ambiguous, since you have interim results that you'd have to share between jobs. My intuition is it would not be worth it.