get_wave_count(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… get_wave_count(9) β€” like, the kernel API manual, bestie

okay so bestie, welcome to get_wave_count, straight out of the Kernel API Manual ✨ this one is a function, it lives in the kernel, and it's about reading device registers to figure out how many waves are in flight for one particular queue πŸŒ€ and like, as a lil bonus, it also hands you back the VMID that's associated with that queue. two-for-one, we love to see it πŸ’–


✨ NAME ✨

get_wave_count β€” reads the device registers so you can get the number of waves in flight for a particular queue πŸŽ€ and the method also returns the VMID associated with the queue, no cap 🫢


✨ SYNOPSIS ✨

void get_wave_count (struct amdgpu_device *adev , int queue_idx , struct
kfd_cu_occupancy *queue_cnt , uint32_t inst );

that's it, that's the whole signature πŸ’… she takes four things and returns void, periodt.


✨ ARGUMENTS ✨

  • adev β€” the handle of the device whose registers are gonna get read πŸ‘‘ like, this is the GPU we're snooping on.
  • queue_idx β€” the index of the queue in the queue-map bit-field 🌸 so, which queue are we talking about, bestie.
  • queue_cnt β€” this one stores the wave count and the doorbell offset for an active queue πŸ¦‹ tiny little struct doing two jobs, iconic.
  • inst β€” the xcc's instance number on a multi-XCC setup ⭐ like, if you've got more than one XCC, this tells her which one you mean. iykyk.
ngl, all four of these are required β€” there's no optional vibe here, every single one is doing its job πŸ™ˆ

✨ SEE ALSO ✨

  • Kernel file ./drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c πŸ“
  • kgd_gfx_v9_get_cu_occupancy(9) β€” go read that one too, fr fr πŸ”₯

and that's the whole page, bestie πŸŽ€ this came to you from ./drivers/gpu/drm/amd/amdgpu, dated October 2026, and yes the page name is get_wave_count(9) β€” mwah, slay, bye πŸ’‹βœ¨

πŸ“¦ where this page comes from