How can I run MPSGraph with float16?

Hi.

I am implementing some neural network model by MPSGraph on Radeon Mac. I want to accelerate it by float16 since Radeon can execute kernels with float16 twice faster than float32.

Is it possible? I mean, does MPSGraph support native float16 on Radeon GPU?

If so, how can I do it? Setting all datatypes to float16?

Thanks.

Accepted Reply

Hi y_ich,

You can indeed accomplish this by setting all datatypes to MPSDataTypeFloat16. That should result in some performance improvement. However the kernels will currently not be using the 2x packed arithmetic feature that some AMD HW is capable of, as that is currently not supported.

Hope that answers your question!

Replies

Hi y_ich,

You can indeed accomplish this by setting all datatypes to MPSDataTypeFloat16. That should result in some performance improvement. However the kernels will currently not be using the 2x packed arithmetic feature that some AMD HW is capable of, as that is currently not supported.

Hope that answers your question!