News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Cuda.. PTX assembly... etc..

Started by K_F, October 19, 2015, 05:57:23 PM

Previous topic - Next topic

K_F

Never one to be 'happy enough'.... with DirectX/OpenGl, I've been looking through the NVidia development systems... (Cuda, PhysX..etc) https://developer.nvidia.com/cuda-zone

Most of these type of dev kits, disappointingly, start off at the C/C++ level, but I pleasantly surprised to find PTX assembly on the the NVidia gpu's..
Although PTX looks to have a C-like management structure.. it's instructions are assembly.

Farabi, sometime ago asked whether it was possible to use the gpu as as extra number cruncher...

Yes you can.. and it looks the the parallel gpu's all can be configured 'on the fly'. This is great as the gpu's can be used for other 'applications', besides graphics. They're essentially a couple hundred processors (FPU/Integer) running in parallel === POWER!  :dazzled:

So what you can do.. is make your own applications (graphics or other) that run on the GPU chip...
Why re-invent the wheel.... Cos you can and have fun doing it.

I must have a look at other graphics cars and see what they have.
:biggrin:
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'

GoneFishing

#1
NVIDIA web site  - golden mine of good resources  :t
As to " use the gpu as as extra number cruncher" - most interesting thing about it that it was used even in pre-CUDA era.
See :
http://gamma.cs.unc.edu/GPUSORT/
http://gamma.cs.unc.edu/GPUFFTW/

By the way , NVIDIA have added new extensions in OpenGL 4.5
Screenshot below illustrates this technology sample

K_F

Still working my way through this..
Asked Nvidia for a 'pure assembler' version of PTX and more explicit info on the GPU cpu's.
I'm probably asking for too much... but if they're ok with this.. I'll be able to play quite nicely...
:biggrin:
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'

GoneFishing

#3
Their CUDA toolkit now contains compiler SDK , not sure if that's what you want. A lot of info!
You may join registered developers program ...

PTX reference:
http://docs.nvidia.com/cuda/pdf/ptx_isa_4.1.pdf

Some extras:
Should I look into PTX to optimize my kernel?
asfermi: An assembler for the NVIDIA Fermi Instruction Set

K_F

I've done all that...

What I'm looking for is the explicit cpu hardware structure/info (as you get with Intel docs).
One could get this with the Transputer, but Nvidia (also Xmos - I dumped them) have 'relieved' us of this pain... which I naturally require  :icon_mrgreen:, by going up a level (they mention this in the docs).

The whole idea is to control (if possible) every aspect of one's code, as it passes through the array of CPUs on the GPU, instead of relying on the compiler to do this for you.
It's essentially the same idea as current FPGA dev kits where you decide, where/how on the chip, the hardware/software executes.

:biggrin:
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'

GoneFishing

I think it's closed information.
The only publicly available GPU internals disclosed by NV are here:
ftp://download.nvidia.com/open-gpu-doc/DCB/1/DCB-4.0-Specification.html

K_F

Ja.. no reply yet  :biggrin: :biggrin:.
Oh well, no harm in trying...

Thanks for the info.. looks interesting.
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'