Nicolas Wadel
Nicolas Wadel

Reputation: 75

Query GPU specification using ManagedCUDA

I'm actually looking to query my GPU specification, in a C# application using ManagedCUDA.

So I looked to the documentation and I saw that there is a class named "CudaDeviceProperties" that has a lot of variables set to store date from the GPU.

But I've no idea how to use it. I tried to create the variable like follow :

CudaDeviceProperties prop = new CudaDeviceProperties();

And attempting to print for example : prop.MaxGridDim.x always return 0

I didn't see any function like in "real" CUDA to set the class variable with something like : cudaGetDeviceProperties(*prop, int device)

So I do some research about a way to query all data I wanted to get with system namespace.. but didn't find a way to get the maxGridDim and maxBlockDim I wanted to have, I got the memory, that actually a good point.

What I want to get :

Thanks for any response, tips, or whatever !

Upvotes: 1

Views: 333

Answers (1)

talonmies
talonmies

Reputation: 72349

There is a method in the ManagedCUDA namespace called GetDeviceInfo which should return the device information which would be returned by cudaGetDeviceProperties in native CUDA.

Upvotes: 1

Related Questions