hl_init_pb_with_mask(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… hl_init_pb_with_mask β€” kernel API manual, but make it a vibe πŸŽ€

okay so bestie, welcome to hl_init_pb_with_mask(9) ✨ this is the habanalabs kernel API manual, and this one function is literally the "set selected pb instances with mask in HW according to given configuration" girlie. she's giving very specific, very hardware, and honestly? iconic πŸ”₯


🌸 NAME 🌸

hl_init_pb_with_mask β€” sets the selected pb instances using a mask in HW, all according to the configuration you hand it. no cap, that's the whole job πŸ’…


✨ SYNOPSIS ✨

int hl_init_pb_with_mask (struct hl_device *hdev , u32 num_dcores , u32
dcore_offset , u32 num_instances , u32 instance_offset , const u32
pb_blocks[] , u32 blocks_array_size , const u32 *user_regs_array , u32
user_regs_array_size , u64 mask );

like, look at her. ten arguments. she's high-maintenance and she knows it πŸ˜­πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • hdev β€” pointer to the hl_device structure. your main character, fr.
  • num_dcores β€” the number of decores you're applying the configuration to. 🫢 pro tip from the page: set it to HL_PB_SHARED if you only need to apply it once.
  • dcore_offset β€” the offset between decores.
  • num_instances β€” how many instances you're applying the configuration to.
  • instance_offset β€” the offset between instances.
  • pb_blocks β€” the blocks array.
  • blocks_array_size β€” the size of the blocks array.
  • user_regs_array β€” the unsecured register array.
  • user_regs_array_size β€” the size of the unsecured register array.
  • mask β€” the enabled instances mask, and the vibes are binary bestie: 1 means enabled, 0 means disabled. periodt. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file itself lives at:

./drivers/accel/habanalabs/common/security.c

and the whole friend group shows up too 🫢:


that's the whole page, bestie, no notes πŸŒˆπŸ’œ

so this one came out of ./drivers/accel/habanalabs/common, dated October 2026 β€” go read the source if you want the deep lore, and remember: mask 1 is on, mask 0 is off, and that's on periodt πŸŽ€βœ¨πŸ”₯

πŸ“¦ where this page comes from