FilesLast commitLast update
4 months ago
10 months ago
5 days ago
18 days ago
6 days ago
10 months ago
4 days ago
5 days ago
README

CoalesceSparse

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: accumulates and sums the values of the same coordinate points, thereby reducing the memory size of the Coo_Tensor.

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
unique_len Input Number of indexes after deduplication. INT32, INT64 ND
unique_indices Input Index array after deduplication. INT32, INT64 ND
indices Input Index array. INT32, INT64 ND
values Input Element value corresponding to each coordinate. INT32, FLOAT16, FLOAT32 ND
new_indices Output Merged index array. INT32, INT64 ND
new_values Output Merged element values. INT32, FLOAT16, FLOAT32 ND

Constraint Description

  • The operator can be called only from the PyTorch side. To use the aclnn API, you need to manually construct the unique_indices input parameter and ensure that the new_values tensor has been set to all zeros before the kernel is invoked.

  • The indices value after re-indexing cannot exceed the upper limit of int32.

Invocation Description

Invocation Method Sample Code Description
aclnn invocation test_aclnn_coalesce_sparse Invokes the CoalesceSparse operator through the aclnnCoalesceSparse API.