jrprice / Oclgrind

An OpenCL device simulator and debugger
Other
346 stars 61 forks source link

Changing simulated hardware settings #147

Closed naummo closed 6 years ago

naummo commented 6 years ago

Hi,

I've installed Oclgrind 16.10 ICD, and, when I run clinfo, I get specs like 128MB for global memory size, 1024x1024x1024 for max work group sizes etc. Is there a way to change that to simulate my real device (GeForce GTX Titan Black) with 6GB of global memory and 1024x1024x64 work group sizes?

The problem I am trying to debug is likely to appear on big workloads, hence I'd like to be able to profile the kernel in such conditions.

Thanks, Naums

jrprice commented 6 years ago

There is currently no way to change these limits, but they aren't actually enforced, so if you want to allocate a much larger buffer then Oclgrind will let you without complaining.

This does become a problem for applications that query these limits from the device and stick to them though. As suggested in #129, it would be a good to make all of these limits configurable for this purpose.

jrprice commented 6 years ago

As of 695897f and 2fc90f8, there is a --global-mem-size flag that allows the size of global memory to be configured at runtime. There will be a new release with this feature very soon.