@bashbaug@mastodon.gamedev.place
@bashbaug@mastodon.gamedev.place avatar

bashbaug

@bashbaug@mastodon.gamedev.place

Interested in GPUs, parallel programming, music, coffee, and hiking. Opinions are my own.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

karolherbst, to random
@karolherbst@chaos.social avatar

@bashbaug Used the intercept layers again today and I was wondering if injecting captured buffers/images is something which is either supported (and I haven't found how to do it yet) or something planned.

Like when I'm comparing between vendors with rusticl, it would be helpful if I could just replace image/buffer outputs with the content from a different capturing to quickly verify if the first difference is actually causing the bug I'm seeing or if it's something else.

bashbaug,
@bashbaug@mastodon.gamedev.place avatar

@karolherbst We don't support injecting captured buffers currently, but this is an interesting idea. I don't think it would be too hard to do in most cases, since it's basically the inverse of the existing logic to dump buffers.

Depending how long the chain of dependencies is, could you cobble something together using the kernel capture and replay functionality to do this test? Worth a try, maybe?

bashbaug,
@bashbaug@mastodon.gamedev.place avatar

If anyone else encounters a similar problem in the future, buffer (and image!) injection is now implemented in the OpenCL Intercept Layer 🎉.

You can take a buffer or image from one device or driver, inject it as a kernel input for a different device or driver, and see how it affects the results.

https://github.com/intel/opencl-intercept-layer/blob/main/docs/injecting_buffers_images.md

#OpenCL

bashbaug, to random
@bashbaug@mastodon.gamedev.place avatar

We released an updated version of the OpenCL Intercept Layer yesterday, just in time for #IWOCL!

This release supports the latest OpenCL extensions, includes a bunch of performance improvements, and adds a bunch of new features, including the ability to capture an OpenCL kernel and replay it outside of an application for easier debugging.

Get the latest version here: https://github.com/intel/opencl-intercept-layer

#OpenCL

bashbaug, to random
@bashbaug@mastodon.gamedev.place avatar

I couldn't make it to Chicago and IWOCL this year, so I did my best to bring Chicago to me. #IWOCL #OpenCL #SYCL

karolherbst, to random
@karolherbst@chaos.social avatar

@bashbaug do you know something about the story around ocl-icd vs the khronos loader and why a lot of distributions seems to default to the ocl-icd one? Is it just that ocl-icd is older and nobody bothered switching or is there something I'm missing here?

bashbaug,
@bashbaug@mastodon.gamedev.place avatar

@oblomov @karolherbst This matches my recollection. The ocl-icd loader was initially developed because the Khronos OpenCL-ICD-Loader was closed source. The Khronos ICD loader is open source now but there hasn't been a good reason for the distros to switch.

They're both well supported and for most usages they're interchangeable. I think there are some slight differences in supported environment variables, but those differences are minor and disappearing.

karolherbst, to random
@karolherbst@chaos.social avatar

@bashbaug hey, do you know if there is an OpenCL ICD layer (or other tools) so one could compare call by call behavior of different CL runtimes?

Like.. e.g. comparing contents of buffers after each kernel invocation.

bashbaug,
@bashbaug@mastodon.gamedev.place avatar

@karolherbst Yes, the OpenCL Intercept Layer can do this. Have a look at the controls to dump buffers or images before or after each enqueue: https://github.com/intel/opencl-intercept-layer/blob/main/docs/controls.md#controls-for-dumping-buffers-and-images

This can take a lot of disk space, so a common workflow is to dump buffer hashes first to see where things deviate, then to dump the full contents of buffers for those enqueues only.

The control to initialize buffers can also be useful on some devices to reduce non-deterministic behavior.

Let me know if this works for you!

bashbaug,
@bashbaug@mastodon.gamedev.place avatar

@karolherbst Excellent, glad to hear!

As long as the kernel isn't doing anything too crazy you should be able to capture it and its arguments and play it back outside of the application, which might help debugging. (Thank Nigel if this works - don't think he's on mastodon... yet.)

https://github.com/intel/opencl-intercept-layer/blob/main/docs/controls.md#capture-and-replay-controls

bashbaug, to random
@bashbaug@mastodon.gamedev.place avatar

Hi folks! I finally moved over here about a month ago and it’s been lovely, so I thought I’d say “hi”.

A bit about me: I work in tech. I know a bit about GPUs. I’m active in open standards and open source. I like parallel programming and teaching people how to to cool things with accelerators.

When I’m not staring at a screen I like roasting my own coffee and spending time in nature - I’m looking forward to a backpacking trip soon, if it’s not covered in snow!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • ngwrru68w68
  • everett
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • GTA5RPClips
  • Durango
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • DreamBathrooms
  • provamag3
  • tacticalgear
  • osvaldo12
  • tester
  • cubers
  • cisconetworking
  • mdbf
  • ethstaker
  • modclub
  • Leos
  • anitta
  • normalnudes
  • megavids
  • lostlight
  • All magazines