Forum Groups
  All forums
    Help & Feedback
      Work in progress
      Finished Art
      Non-Max related

Featured Threads
  inspiration alert!!!
(36 replies)
  Indespensible MaxScripts, Plugins and 3rd Party Tools
(37 replies)
  The allmighty FREE Resources Thread !
(17 replies)
  spam alert!!!
(4886 replies)
  Maxforums member photo gallery index
(114 replies)
  Maxforums Member Tutorials
(89 replies)
  three cheers to maxforums...
(240 replies)
  101 Things you didnt know in Max...
(198 replies)
  A Face tutorial from MDB101 :D
(95 replies) Members Gallery
(516 replies)
(637 replies)
  Dub's Maxscript Tutorial Index
(119 replies)

Maxunderground news unavailable

Any OpenCL wizard around here?
show user profile  Garp
I've just started learning OpenCL. I'm having a lot of fun but also a few questions.

read 471 times
11/9/2014 1:50:11 AM (last edit: 11/9/2014 1:50:11 AM)
show user profile  gogodr
if you are talking about Cuda, I have some experience.

Hello there

beautiful ;3

read 451 times
11/9/2014 4:32:33 PM (last edit: 11/9/2014 4:32:33 PM)
show user profile  Garp
Thanks a lot gogodr but I'm talking about OpenCL specifically.
For example, I'm getting some odd results for my graphics card from clGetDeviceInfo and I'm not sure how to interpret them.

read 448 times
11/9/2014 4:59:27 PM (last edit: 11/9/2014 4:59:27 PM)
show user profile  gogodr
what are you getting?
care to show how you are calling the function?
I'm looking at this for reference.

Hello there

beautiful ;3

read 438 times
11/9/2014 7:16:51 PM (last edit: 11/9/2014 7:16:51 PM)
show user profile  Garp
gogodr, the function calls are fine.
When querying preferred and natives sizes for vector types (stored on long registers), it always returns 1. For preferred sizes, it makes sense since OpenCL prefers dealing with vectors by itself. But getting 1 for native sizes 'should' mean that there are no long registers on my card! It's a GTX 560. Not the high end of cards but I'm pretty sure it has 128-bit registers.
So now I'm wondering whether it's a problem with Nvidia's implementation or something else. When I'll have time, I'll install AMD's SDK (and perhaps Intel's as well) to check.

edit: your link shows some kind of wrapper, not the standard function.

read 431 times
11/9/2014 9:00:53 PM (last edit: 11/9/2014 9:04:26 PM)
show user profile  gogodr
you are telling me that it is returning 1, so I don't really have the whole context of your problem. It might be this tho:

You do know that CLGetDeviceInfo always return 1 right?
(unless there is an error, on which it returns 0)
what you want to read is the data third parameter of that function which is an output parameter.


uchar data[1024];
uint size;
Print("The preferred vector width is: " + CharArrayToString(data));
Print("There was an error");

Hello there

beautiful ;3

read 428 times
11/9/2014 10:41:02 PM (last edit: 11/9/2014 10:41:02 PM)
show user profile  Garp
By 'return value', I mean the out parameter, not the error code that the function actually returns. I've been reading infos from my GPU and they're all fine, except for those I mentionned. So, as I said, it's not the function call.
And I'm using standard OpenCL (the signature is a little different), the idea being to write portable code. Below is a sample.

where device is a cl_device_id and vector_width is a cl_uint.

read 424 times
11/9/2014 11:08:08 PM (last edit: 11/9/2014 11:14:26 PM)
show user profile  gogodr
it might be a hardware limitation. To my knowledge OpenCL is a thing, but it is not standardized yet.

Hello there

beautiful ;3

read 410 times
11/10/2014 3:17:23 AM (last edit: 11/10/2014 3:17:23 AM)
show user profile  Garp
OpenCL is a standard. How compliant the various implementations are is a different story.
There seem to be small discrepancies between implementations (on top of not implementing the same version). This could become a nuisance when dispatching/customizing code to make the best possible use of the client's hardware. That's what I'm mostly worried about after getting those strange results.
But as I said, I've just started learning. So I won't panick just yet ;)

read 396 times
11/10/2014 3:38:43 PM (last edit: 11/10/2014 3:38:43 PM)
#Maxforums IRC
Open chat window