Skip to content

Commit

Permalink
[ascend]zq/reimpl index_put (#1009)
Browse files Browse the repository at this point in the history
reimpl index_put
  • Loading branch information
NeosZhang authored Mar 1, 2024
1 parent 57a3b7a commit 28bbbf4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions impl/ascend_npu/diopi_impl/index_put.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include "helper.hpp"
#include "op_plugin/AclOpsInterface.h"
#include "op_plugin/OpApiInterface.h"

namespace OP_IMPL_NS {

Expand All @@ -19,7 +20,7 @@ diopiError_t diopiIndexPut(diopiContextHandle_t ctx, diopiTensorHandle_t out, di
}

outAt.copy_(inputAt);
at::index_put_(outAt, indicesAtList, valuesAt, accumulate);
op_api::index_put_(outAt, indicesAtList, valuesAt, accumulate);
END_CALL_ACL_OP();
}

Expand All @@ -32,7 +33,7 @@ diopiError_t diopiIndexPutInp(diopiContextHandle_t ctx, diopiTensorHandle_t inpu
indicesAtList.emplace_back(impl::aten::buildATen(indices[i]));
}

at::index_put_(inputAt, indicesAtList, valuesAt, accumulate);
op_api::index_put_(inputAt, indicesAtList, valuesAt, accumulate);
END_CALL_ACL_OP();
}

Expand Down

0 comments on commit 28bbbf4

Please sign in to comment.