#MiniMax on GPU

48 messages · Page 1 of 1 (latest)

unborn hazel
#

Hey, what would be the best way to implement MiniMax on a GPU? (E.g. using the library Aparapi)

main ibexBOT
#

This post has been reserved for your question.

Hey @unborn hazel! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

rancid perch
#

Why do you think GPUs would be useful for Minimax?

unborn hazel
#

A CPU only has like 4-8 cores

#

A GPU has hundreds-thousands

rancid perch
#

they are faster at specific things

unborn hazel
#

They do have more cores though

rancid perch
#

like they cannot do everything a CPU can

unborn hazel
#

Allowing you to split the workload

rancid perch
rancid perch
unborn hazel
#

I know that it's possible for Monte Carlo

#

And it should also be for MiniMax

rancid perch
#

Monte Carlo Tree search is an entirely different topic and depending on what you are doing with Monte Carlo Tree search, you can use GPU in order to improve it

unborn hazel
#

I know

#

But it should also work for MiniMax

rancid perch
#

depending on what tree policy and default policy you are using

unborn hazel
#

Hmm?

rancid perch
#

but there does seem to be research on parallelizing Minimax using GPUs

unborn hazel
#

But I'm using MiniMax

rancid perch
#

but it isn't a thing of running it on a GPU and it would be faster

unborn hazel
#

No, you will have to split it

#

It's multi threading but with much more threads

rancid perch
#

according to that, the results seem to vary between an 1.4x and 30x speed-up

unborn hazel
#

According to my teammate it's 60x 🤡

rancid perch
#

DId they try it themselves?

unborn hazel
#

No

rancid perch
#

well, that's the issue

#

and it strongly depends on what's actually done with Minimax (I guess)

#

e.g. how the score is calculated

rich jasper
#

To be clear: A single GPU core is feature-wise an absolute weakling compared to a CPU core. That is why only a subset of workloads which run on CPU are at all able to run on GPU - before you even start considering whether it will be faster.

unborn hazel
#

Well, we are trying to figure out if it's faster or not

#

But to do that, we have to implement it

rich jasper
#

A good first step is to figure out whether it is at all possible to run there. You can do that by breaking down the operations required by the process and seeing if those are even supported.

#

No coding required - just grab a note book / app.

unborn hazel
#

It for sure is possible

#

But I just have no idea how I would split up the workload

rich jasper
#

Oh so you've completed the analysis already?

unborn hazel
#

No

rich jasper
#

Ok

unborn hazel
#

But like, I can't find a single thing about how to effectively split up the workload

elder jackal