From: Jerry Zhang Date: Sat, 12 Jan 2019 02:37:03 +0000 (-0800) Subject: rocm build (#15981) X-Git-Tag: accepted/tizen/6.5/unified/20211028.231830~1881 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=55b0e2a1eb4e2a258f27c999c2abd9b258b9b9ff;p=platform%2Fupstream%2Fpytorch.git rocm build (#15981) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/15981 caffe2/operators/unique_ops.cu translated to caffe2/operators/hip/unique_ops.hip breaks rocm build Reviewed By: BIT-silence Differential Revision: D13646129 fbshipit-source-id: 900a14e14216686ec4560b30df2eabbd7ec2ff91 --- diff --git a/caffe2/operators/unique_ops.cu b/caffe2/operators/unique_ops.cu index e8d2e5d..88c6aad 100644 --- a/caffe2/operators/unique_ops.cu +++ b/caffe2/operators/unique_ops.cu @@ -69,7 +69,7 @@ bool UniqueOp::DoRunWithType() { } const T* input = inputTensor.template data(); - ReinitializeTensor(&thrust_unique_buffer_, {N}, at::dtype().device(Context::GetDeviceType())); + ReinitializeTensor(&thrust_unique_buffer_, {N}, at::dtype().device(CUDA)); auto* buffer = thrust_unique_buffer_.template mutable_data(); context_.CopyItemsSameDevice(inputTensor.meta(), N, input, buffer);