Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions paddle/fluid/pybind/op_function_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1559,8 +1559,8 @@ PyObject* GetItemFromArgsOrKWArgs(PyObject* args,
return arg;
}
} else {
// get item from kwargs if kwargs has unused items
if (kwargs && *remaining_kwargs > 0) {
// get item from kwargs
if (kwargs) {
PyObject* arg = nullptr;
for (const std::string& keyword : keywords) {
arg = PyDict_GetItemString(kwargs, keyword.c_str());
Expand Down
3 changes: 0 additions & 3 deletions test/auto_parallel/test_api_dist_branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,6 @@ def test_bincount_api_for_dist_tensor(self):

local_out = paddle.bincount(local_x, weights=local_weight)
dist_out = paddle.bincount(dist_x, weights=dist_weight)
# add keywords usage case after fix code gen bug
# dist_out = paddle.bincount(dist_x, weights=dist_weight)
dist_out = paddle.bincount(dist_x, dist_weight)

self.check_tensor_eq(local_out, dist_out)

Expand Down
Loading