FilesLast commitLast update
4 months ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
10 days ago
README

CalcBucketsLimitAndOffset

English | 简体中文

Product Support Status

Product Supported
Ascend 950PR&950DT products √
Atlas A3 products √
Atlas A2 products √
Atlas 200I/500 A2 inference products √
Atlas inference products √
Atlas training products √

Function Description

  • Operator function: obtains the count and offset of the corresponding bucket from ivf_counts and ivf_offset based on bucket_list indexes, limits the total count of all buckets based on total_limit, and outputs the limited count and the corresponding offsets.

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
bucket_list Input 1-D tensor, a list of bucket indexes, whose values are the subscripts of ivf_counts and ivf_offset. INT32 ND
ivf_counts Input 1-D tensor, the count value of each bucket. INT32 ND
ivf_offset Input 1-D tensor, the offset of each bucket. INT32, INT64 ND
total_limit Attribute Upper limit of the total count of all buckets. INT -
buckets_limit Output 1-D tensor, the limited count value of each bucket, whose total does not exceed total_limit. INT32 ND
buckets_offset Output 1-D tensor, the offsets corresponding to bucket_list. INT32, INT64 ND

Constraint Description

  • The values in bucket_list must be within the range [0, number of elements in ivf_counts) and [0, number of elements in ivf_offset)
  • The numbers of elements in ivf_counts and ivf_offset must be greater than or equal to the maximum index value in bucket_list
  • total_limit must be a non-negative integer

Invocation Description

Invocation Method Sample Code Description
Graph-mode API test_geir_calc_buckets_limit_and_offset Invokes the CalcBucketsLimitAndOffset operator through the operator IR API.