Skip to content

Cycles : Use ccl::DeviceInfo's 'num' entry instead of typeIndex for the index representation of the GPU device number.#6890

Open
boberfly wants to merge 1 commit intoGafferHQ:1.6_maintenancefrom
boberfly:fixes/cyclesDeviceIndex
Open

Cycles : Use ccl::DeviceInfo's 'num' entry instead of typeIndex for the index representation of the GPU device number.#6890
boberfly wants to merge 1 commit intoGafferHQ:1.6_maintenancefrom
boberfly:fixes/cyclesDeviceIndex

Conversation

@boberfly
Copy link
Copy Markdown
Collaborator

Generally describe what this PR will do, and why it is needed

  • So I wanted to try building HIP/HIPRT support with Cycles again as I have a laptop with 2x RDNA2 GPUs in it (integrated and RX 6800M) - it turns out the typeIndex isn't guaranteed to be the device number order, where the integrated graphics comes first and the discrete GPU comes second, however their index number ordering is in reverse.
Screenshot 2026-04-14 213608

In the above image, HIP:00 is the discrete GPU but HIP:01 is the integrated graphics.

CPU: IECore.CompoundData({'type':IECore.StringData( 'CPU' ),'description':IECore.StringData( 'AMD Ryzen 7 6800HS' ),'denoisers':IECore.IntData( 4 ),'cpu_threads':IECore.IntData( 0 ),'has_gpu_queue':IECore.BoolData( 0 ),'has_peer_memory':IECore.BoolData( 0 ),'has_profiling':IECore.BoolData( 1 ),'has_osl':IECore.BoolData( 1 ),'has_nanovdb':IECore.BoolData( 1 ),'display_device':IECore.BoolData( 0 ),'num':IECore.IntData( 0 ),'id':IECore.StringData( 'CPU' )})
HIP_AMD Radeon(TM) Graphics_0000:68:00: IECore.CompoundData({'type':IECore.StringData( 'HIP' ),'description':IECore.StringData( 'AMD Radeon(TM) Graphics' ),'denoisers':IECore.IntData( 4 ),'cpu_threads':IECore.IntData( 0 ),'has_gpu_queue':IECore.BoolData( 1 ),'has_peer_memory':IECore.BoolData( 0 ),'has_profiling':IECore.BoolData( 0 ),'has_osl':IECore.BoolData( 0 ),'has_nanovdb':IECore.BoolData( 1 ),'display_device':IECore.BoolData( 0 ),'num':IECore.IntData( 1 ),'id':IECore.StringData( 'HIP_AMD Radeon(TM) Graphics_0000:68:00' )})
HIP_AMD Radeon RX 6800M_0000:03:00: IECore.CompoundData({'type':IECore.StringData( 'HIP' ),'description':IECore.StringData( 'AMD Radeon RX 6800M' ),'denoisers':IECore.IntData( 4 ),'cpu_threads':IECore.IntData( 0 ),'has_gpu_queue':IECore.BoolData( 1 ),'has_peer_memory':IECore.BoolData( 0 ),'has_profiling':IECore.BoolData( 0 ),'has_osl':IECore.BoolData( 0 ),'has_nanovdb':IECore.BoolData( 1 ),'display_device':IECore.BoolData( 0 ),'num':IECore.IntData( 0 ),'id':IECore.StringData( 'HIP_AMD Radeon RX 6800M_0000:03:00' )})

Instead I use the DeviceInfo's "num" entry for the index numbering in both the UI and the backend renderer code. Now when I select them I get the results I'm expecting.

Related issues

  • NA

Dependencies

  • NA

Breaking changes

  • Not related to current builds as it isn't compiled with HIP, however I expect current Cuda/OptiX setups to work like they did before, granted the "num" value matches "typeIndex" for those.

Checklist

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable.
  • I have tested my change(s) in the test suite, and added new test cases where necessary.
  • My code follows the Gaffer project's prevailing coding style and conventions.

…he index representation of the GPU device number.
@boberfly boberfly changed the base branch from main to 1.6_maintenance April 15, 2026 03:52
@boberfly
Copy link
Copy Markdown
Collaborator Author

motionBlur

Just to verify HIPRT looks to match the CPU for motion blur too, this is on Cycles 5.1.0 with the even motion samples patches applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant