Skip to content

armgit / uzu

Public Imported from GitHub
0

A high-performance inference engine for AI models

1.7 KB
Raw Blame
// Autogenerated stub
import definitions;
import generated.weaver;

[[Variants("BLOCK_THREADS", "256, 1024")]]
[[Public]] [[Kernel]] func WeaverSelect<let BLOCK_THREADS: uint32_t>(
  [[Optional("mode != WeaverSelectionMode::Frontier")]] StructuredBuffer<BFloat16> residual_logits,
  [[Optional("mode != WeaverSelectionMode::Frontier")]] StructuredBuffer<uint64_t> depth_seeds,
  RWStructuredBuffer<uint32_t> frontier,
  RWStructuredBuffer<uint32_t> packed_tree,
  [[Optional("mode != WeaverSelectionMode::Children")]] RWStructuredBuffer<uint32_t> slot_ancestors,
  [[Optional("mode != WeaverSelectionMode::Children")]] RWStructuredBuffer<uint32_t> node_token_ids,
  RWStructuredBuffer<uint32_t> node_metadata,
  [[Optional("mode != WeaverSelectionMode::Children")]] RWStructuredBuffer<uint32_t> node_ancestor_indices,
  RWStructuredBuffer<uint32_t> node_valid,
  StructuredBuffer<uint32_t> candidate_pool_ids,
  StructuredBuffer<float> candidate_pool_logits,
  RWStructuredBuffer<uint32_t> node_candidate_ids,
  RWStructuredBuffer<float> node_candidate_logits,
  uint32_t children_rows,
  uint32_t children_from_pool,
  uint32_t candidates,
  uint32_t expand_width,
  uint32_t vocab_size,
  uint32_t frontier_capacity,
  uint32_t tree_slot_count,
  uint32_t node_count,
  uint32_t batch_start_slot,
  uint32_t ancestor_stride,
  uint32_t lookahead_count,
  uint32_t candidate_depth_count,
  [[Optional("has_prune_noise")]] float prune_noise_scale,
  [[Specialize]] WeaverSelectionMode mode,
  [[Specialize]] bool has_prune_noise,
  ThreadContext global_context,
  [[Groups("if mode == WeaverSelectionMode::Children { children_rows } else {1}")]] uint32_t group_index,
  [[Threads("BLOCK_THREADS")]] uint32_t global_lid,
) {
  // TODO
}