提交 71e14e91 编写于 作者: J Justin Lebar 提交者: TensorFlower Gardener

[XLA] Avoid calling malloc/free in TransposeLiteralInternal.

Change: 150155800
上级 173d1b32
......@@ -279,8 +279,7 @@ void TransposeLiteralInternal(const Literal& original,
for (int64 i = 0; i < indices.size(); ++i) {
new_indices[i] = indices[permutation[i]];
}
LiteralUtil::Set<T>(
result, Permute(InversePermutation(permutation), indices), value);
LiteralUtil::Set<T>(result, new_indices, value);
});
}
} // namespace
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册