From a00eb0c1eb814afa9526f4e349fd36253402beed Mon Sep 17 00:00:00 2001 From: take-cheeze Date: Wed, 4 Sep 2019 13:27:48 +0900 Subject: [PATCH] Workaround device boundary issue in Gather op --- runtime/ops/indexing.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/ops/indexing.cc b/runtime/ops/indexing.cc index 3bb29888..51e6bc2e 100644 --- a/runtime/ops/indexing.cc +++ b/runtime/ops/indexing.cc @@ -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_) {