batch : add n_used count (#14512)

ggml-ci
This commit is contained in:
Georgi Gerganov
2025-07-04 09:04:59 +03:00
committed by GitHub
parent 499a8f5a78
commit c79184d2d1
6 changed files with 34 additions and 1 deletions

View File

@@ -54,6 +54,7 @@ public:
uint32_t get_n_tokens() const;
uint32_t get_n_outputs() const;
uint32_t get_n_used() const;
// the array of output indices in the order they were encountered during the ubatch splitting
std::vector<int32_t> & get_out_ids();
@@ -125,6 +126,8 @@ private:
// batch indices of the output
std::vector<int32_t> out_ids;
uint32_t n_used;
// used[i] indicates if token i has already been used in a previous ubatch
std::vector<bool> used;