GPU computing Stay up to date in OpenCL, DirectCompute, CUDA, CAL and OpenGL information

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Thursday, 25 February 2010

Shaders: measuring perf, source translation and parsing different languages!

Posted on 07:07 by Unknown
Hi,
I hope to be pretty exhaustive of options for parsing and translating between graphics and compute shaders ( some open source)


For DX shaders:
*GPU Shader analyzer (AMD ONLY)(get DX IL and get AMD IL and GPU assembly from DirectCompute shaders or graphic shaders): now is dx11 compatible and 5xxx series and has compute domain and hull shaders..
*fxc and D3DCompile API and lib: get DX IL and bytecode from DX shaders (multivendor)
note I don't know how to build from DX IL as D3DCompile doesn't accept and also not CreateComputeShader.. finally GPU SA doesn't want to eat too..
it's a fxc option or API for going from DX IL to DX BC so I can optimize DX IL and then compile to DX ByteCode and feed that to a compute shader?
at least if you have source you can see AMD IL, DX IL and R800 assembly and

teoretically you can get AMD IL from Compute shaders using GPU SA and feed into OpenCL when it support getting binaries and building from it (or intercepting now llc or something like that).. so in OpenCL you can modify generated assembly soon (on  Nvidia now..)
so you can compare quailty of generated code..
Also now you can feed DX shaders to GPU SA and a equivalent OCL shader through SKA and compare AMD IL, assembly and even all the info of ALU/tex kernels/s etc..
I have tested simple vectoradd and quality is the same (kernels/s) altough AMD IL from OCL seems much longer..
Parsing HLSL: you have Nvidia CG compiler source so CG=HLSL in 99% so you have parser and front end compiler code.. (I think it has some flex bison things)

There was a AMD HLSL which was extension to HLSL having scatter doubles etc..
http://coachk.cs.ucf.edu/courses/CDA6938/s08/UCF-2008-02-01b.pdf
http://coachk.cs.ucf.edu/courses/CDA6938/s08/AMD_IL.pdf

Now included in compute shader 5.0 and pixel shader 5.0 in DX11 all functionality also included in upcoming GLSL ext_gpu_shader5 I presume (I can't find AMD HLSL compiler anywhere so I think efforts migrated to Brook+ efforts and AMD IL):


Note for Nvidia there is a tool similar to GPU SA but I think it's payed (ShaderPerf, perfkit can't I think..)
Have to see if Nexus will have PTX code from shaders or anything like that..
Also DX11 support is missing naturally in all tools (Perfkit, shaderperf,etc..)

HLSL<->GLSL source to source translation:
hlsl2glsl-v0.9 (OpenGL ES also source code)
babelshader


Only pixel vertex shaders..

GLSL
GPU Shader analyzer (get AMD IL from DirectCompute shaders or graphic shaders)
you can use HLSL->GLSL and using GPU SKA compare quality of generated GLSL vs HLSL AMD IL or assembly code..


Parsing GLSL:
you have flex and bison almost from spec (tokens and grammar)..

3d labs glsl validate and front end compiler open source..
(i can't find)

hlsl2glsl-v0.9..



Brook+ is open source
has AMD IL code gen source and brook parsing (ctool based)

Another thing is measuring perf of not shaders of whole thing with OpenGL gdebugger, mac OpenGL perf libs, AMD GPU 2.1, Nvidia Nexus and GL perf API and libs(perfkit sdk),
For having similar to OpenCL CAL lib see CAL++.
For porting CUDA to OpenCL there are to guides from Nvidia and AMD and:
Experiences porting from CUDA to OpenCL
 Presentation at the Daresbury Machine Evaluation Workshop, 2009
also a tool:
Swan: A simple tool for porting CUDA kernels to OpenCL
A good OpenCL to DirectCompute driver wuold be good!
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Porting CUDA to OpenCL!
    Well so you want to port CUDA code to OpenCL: you are in AMD GPU competition of porting Cuda codes to opencl (see previous post) or you are ...
  • Megapost!
    Today fools{ *GTX 485 is 512 cores 3gbytes gddr5 and 850/1750 shaders.. *ati 5990 has 4 gpus in board.. *bulldozer benchmarks }end fools.. A...
  • About ATI and Nvidia drivers (OCL included)!
    Hi I have been investigating AMD and Nvidia drivers.. for 10.3 there are 3d hooks support for 120hz monitors but is d3d9 d3d10 or d3d11 enab...
  • things found in CUDA forums
    Also some CUDA news: Mandelbulb stereo angalyph -> have to port to 3D Vision http://forums.nvidia.com/index.php?showtopic=150985&st=2...
  • opencl/opengl linux interop! seen in opencl cuda 3.0 sdk samples
    Following my OpenCL/OpenGL Window interop work: now has come to Linux  for Nvidia GPU computing registered developers via 195.17 driver! Als...
  • State of the blog..
    Sorry for the delay guys of posting code of Apple OpenCL demos port.. the blog has been with no updated for more than 2 weeks in this rapid ...
  • Optix and OpenCL SDKs with Visual Studio 2010
    Optix 1.0 ========= install cg download Cmake 2.80 cmake says error dumpbin not found and it is cuda doesn't work with vc2010 so copy pt...
  • CUDA 3.0 forums stuff!
    1.Getting CUBIN instead of ELF If you need the older text format, you can disable ELF cubins in nvcc.profile by changing "CUBINS_ARE_EL...
  • News from the web!
    Some things learned in AMD forums: 1.Why 3xxx no OpenCL: Compute shader mode is a hardware feature that did not exist in the HD38XX line of ...
  • Shaders: measuring perf, source translation and parsing different languages!
    Hi, I hope to be pretty exhaustive of options for parsing and translating between graphics and compute shaders ( some open source) For DX sh...

Blog Archive

  • ►  2013 (5)
    • ►  September (1)
    • ►  March (3)
    • ►  February (1)
  • ►  2012 (1)
    • ►  December (1)
  • ▼  2010 (46)
    • ►  July (4)
    • ►  May (1)
    • ►  April (3)
    • ►  March (9)
    • ▼  February (15)
      • Reading Fermi CUDA stuff!
      • Questions about OpenCL AMD d3d9 interop!
      • News 25/2!
      • 3 new tools!
      • Ideas for porting algos to GPU:AVX SSE and MMX ports!
      • About ATI and Nvidia drivers (OCL included)!
      • Shaders: measuring perf, source translation and pa...
      • Enabling OpenCL Image support on AMD GPUs!
      • Running QT everywhere!
      • Parallel algorithms avaiable on CUDA,OCL,DC,CAL: s...
      • More news!
      • Learned from voxel rendering demo code: CUDA 3.0 h...
      • A month of news!
      • About Tesla computing driver!
      • A long report of the silence before the storm: AKA...
    • ►  January (14)
  • ►  2009 (125)
    • ►  December (51)
    • ►  November (53)
    • ►  October (21)
Powered by Blogger.

About Me

Unknown
View my complete profile