Skip to content

Commit

Permalink
Merge pull request #639 from take-cheeze/fix_take_dev
Browse files Browse the repository at this point in the history
Workaround device boundary issue in Gather op
  • Loading branch information
take-cheeze authored Sep 4, 2019
2 parents 4a31e71 + a00eb0c commit 6ef4b4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/ops/indexing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ chainerx::Array GetItemGradOp::RunImpl(
}

chainerx::Array GatherOp::RunImpl(ChxVMState* st, const chainerx::Array& data, const chainerx::Array& indices) {
return data.Take(indices, axis);
return data.Take(indices.ToDevice(data.device()), axis);
}

chainerx::Array GatherElementsOp::RunImpl(ChxVMState* st, const chainerx::Array& data, const chainerx::Array& indices_) {
Expand Down

0 comments on commit 6ef4b4a

Please sign in to comment.