Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is possible to use tensor cores and cuda cores in a mixed way?

Tags:

cuda

gpu

tensor

hpc

I have RTX2060 Nvidia graphic card which has tensor cores on it. I want to run my codel utilizing tensor cores and cuda cores in a mixed way.The idea is to have a part of the code executed by tensor cores and another part by the cuda cores, in order to get a performance speedup.

My question is: is possible to do something like that or I'm a dreamer. Thanks in advance


1 Answers

You can look at the example in the question here for how to use tensor cores in CUDA code. The only thing to add is that matrix C doesn't have to be set to 0 and doesn't need to be reused as matrix D.

So you write normal CUDA code and insert warp-level instructions like mma_sync() for involving Tensor cores in the computations. You can find the documentation on how to use Tensor cores in the normal CUDA code here.

Header and namespace:

#include <mma.h>
using namespace nvcuda;
like image 74
Serge Rogatch Avatar answered Dec 30 '25 15:12

Serge Rogatch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!