get_wave_count(9)
π 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms