[XLA:GPU][NFC] Avoid using rvalue references per style guide.
- https://google.github.io/styleguide/cppguide.html#Rvalue_references PiperOrigin-RevId: 351599314 Change-Id: Iec6fd0ba9ac66815fa4491d4659e57dcbec73732
This commit is contained in:
parent
2ab8822125
commit
a919ce09c9
@ -227,7 +227,7 @@ CollectivePermuteConfig GetCollectivePermuteConfig(
|
||||
}
|
||||
|
||||
CollectivePermuteThunk::CollectivePermuteThunk(
|
||||
ThunkInfo thunk_info, CollectivePermuteConfig&& config,
|
||||
ThunkInfo thunk_info, CollectivePermuteConfig config,
|
||||
const BufferAllocation::Slice& src, const BufferAllocation::Slice& dest)
|
||||
: Thunk(kCollectivePermute, thunk_info),
|
||||
config_(std::move(config)),
|
||||
|
@ -33,7 +33,7 @@ CollectivePermuteConfig GetCollectivePermuteConfig(const HloInstruction* instr);
|
||||
// Thunk that implements the collective-permute HLO.
|
||||
class CollectivePermuteThunk : public Thunk {
|
||||
public:
|
||||
CollectivePermuteThunk(ThunkInfo thunk_info, CollectivePermuteConfig&& config,
|
||||
CollectivePermuteThunk(ThunkInfo thunk_info, CollectivePermuteConfig config,
|
||||
const BufferAllocation::Slice& src,
|
||||
const BufferAllocation::Slice& dest);
|
||||
|
||||
|
@ -26,8 +26,8 @@ namespace gpu {
|
||||
|
||||
ConditionalThunkConfig GetConditionalThunkConfig(
|
||||
const HloInstruction* instr,
|
||||
std::vector<ThunkSequence>&& branch_thunk_sequences,
|
||||
std::vector<absl::optional<size_t>>&& branch_profile_indices) {
|
||||
std::vector<ThunkSequence> branch_thunk_sequences,
|
||||
std::vector<absl::optional<size_t>> branch_profile_indices) {
|
||||
ConditionalThunkConfig config;
|
||||
config.branch_index_is_bool =
|
||||
instr->operand(0)->shape().element_type() == PRED;
|
||||
@ -45,7 +45,7 @@ ConditionalThunkConfig GetConditionalThunkConfig(
|
||||
}
|
||||
|
||||
ConditionalThunk::ConditionalThunk(
|
||||
ThunkInfo thunk_info, ConditionalThunkConfig&& config,
|
||||
ThunkInfo thunk_info, ConditionalThunkConfig config,
|
||||
const BufferAllocation::Slice& branch_index_buffer_index,
|
||||
absl::Span<const BufferAllocation::Slice> branch_operand_buffer_indexes)
|
||||
: Thunk(Kind::kConditional, thunk_info),
|
||||
|
@ -39,8 +39,8 @@ struct ConditionalThunkConfig {
|
||||
|
||||
ConditionalThunkConfig GetConditionalThunkConfig(
|
||||
const HloInstruction* instr,
|
||||
std::vector<ThunkSequence>&& branch_thunk_sequences,
|
||||
std::vector<absl::optional<size_t>>&& branch_profile_indices);
|
||||
std::vector<ThunkSequence> branch_thunk_sequences,
|
||||
std::vector<absl::optional<size_t>> branch_profile_indices);
|
||||
|
||||
// ConditionalThunk implements the conditional instruction on GPU by reading the
|
||||
// predicate of the conditional and executing the true or the false computation
|
||||
@ -55,7 +55,7 @@ ConditionalThunkConfig GetConditionalThunkConfig(
|
||||
class ConditionalThunk : public Thunk {
|
||||
public:
|
||||
ConditionalThunk(
|
||||
ThunkInfo thunk_info, ConditionalThunkConfig&& config,
|
||||
ThunkInfo thunk_info, ConditionalThunkConfig config,
|
||||
const BufferAllocation::Slice& branch_index_buffer_index,
|
||||
absl::Span<const BufferAllocation::Slice> branch_operand_buffer_indexes);
|
||||
|
||||
|
@ -31,7 +31,7 @@ namespace xla {
|
||||
namespace gpu {
|
||||
|
||||
ConvolutionThunk::ConvolutionThunk(
|
||||
ThunkInfo thunk_info, GpuConvConfig&& config,
|
||||
ThunkInfo thunk_info, GpuConvConfig config,
|
||||
std::vector<BufferAllocation::Slice> operand_slices,
|
||||
BufferAllocation::Slice result_slice, BufferAllocation::Slice scratch_slice)
|
||||
: Thunk(Kind::kConvolution, thunk_info),
|
||||
|
@ -42,7 +42,7 @@ class ConvolutionThunk : public Thunk {
|
||||
// Constructs a thunk for launching a DNN convolution.
|
||||
//
|
||||
// operand_slices should be in the same order as cudnn_call->operands().
|
||||
ConvolutionThunk(ThunkInfo thunk_info, GpuConvConfig&& config,
|
||||
ConvolutionThunk(ThunkInfo thunk_info, GpuConvConfig config,
|
||||
std::vector<BufferAllocation::Slice> operand_slices,
|
||||
BufferAllocation::Slice result_slice,
|
||||
BufferAllocation::Slice scratch_slice);
|
||||
|
@ -32,7 +32,7 @@ namespace gpu {
|
||||
namespace dnn = se::dnn;
|
||||
|
||||
CudnnBatchNormForwardInferenceThunk::CudnnBatchNormForwardInferenceThunk(
|
||||
ThunkInfo thunk_info, CudnnBatchNormConfig&& config,
|
||||
ThunkInfo thunk_info, CudnnBatchNormConfig config,
|
||||
const BufferAllocation::Slice& operand,
|
||||
const BufferAllocation::Slice& scale, const BufferAllocation::Slice& offset,
|
||||
const BufferAllocation::Slice& mean,
|
||||
@ -71,7 +71,7 @@ Status CudnnBatchNormForwardInferenceThunk::ExecuteOnStream(
|
||||
}
|
||||
|
||||
CudnnBatchNormForwardTrainingThunk::CudnnBatchNormForwardTrainingThunk(
|
||||
ThunkInfo thunk_info, CudnnBatchNormConfig&& config,
|
||||
ThunkInfo thunk_info, CudnnBatchNormConfig config,
|
||||
const BufferAllocation::Slice& operand,
|
||||
const BufferAllocation::Slice& scale, const BufferAllocation::Slice& offset,
|
||||
const BufferAllocation::Slice& output_data,
|
||||
@ -115,7 +115,7 @@ Status CudnnBatchNormForwardTrainingThunk::ExecuteOnStream(
|
||||
}
|
||||
|
||||
CudnnBatchNormBackwardThunk::CudnnBatchNormBackwardThunk(
|
||||
ThunkInfo thunk_info, CudnnBatchNormConfig&& config,
|
||||
ThunkInfo thunk_info, CudnnBatchNormConfig config,
|
||||
const BufferAllocation::Slice& operand,
|
||||
const BufferAllocation::Slice& scale, const BufferAllocation::Slice& mean,
|
||||
const BufferAllocation::Slice& inv_stddev,
|
||||
|
@ -48,7 +48,7 @@ namespace gpu {
|
||||
class CudnnBatchNormForwardInferenceThunk : public Thunk {
|
||||
public:
|
||||
CudnnBatchNormForwardInferenceThunk(ThunkInfo thunk_info,
|
||||
CudnnBatchNormConfig&& config,
|
||||
CudnnBatchNormConfig config,
|
||||
const BufferAllocation::Slice& operand,
|
||||
const BufferAllocation::Slice& scale,
|
||||
const BufferAllocation::Slice& offset,
|
||||
@ -76,7 +76,7 @@ class CudnnBatchNormForwardInferenceThunk : public Thunk {
|
||||
class CudnnBatchNormForwardTrainingThunk : public Thunk {
|
||||
public:
|
||||
CudnnBatchNormForwardTrainingThunk(
|
||||
ThunkInfo thunk_info, CudnnBatchNormConfig&& config,
|
||||
ThunkInfo thunk_info, CudnnBatchNormConfig config,
|
||||
const BufferAllocation::Slice& operand,
|
||||
const BufferAllocation::Slice& scale,
|
||||
const BufferAllocation::Slice& offset,
|
||||
@ -104,7 +104,7 @@ class CudnnBatchNormForwardTrainingThunk : public Thunk {
|
||||
class CudnnBatchNormBackwardThunk : public Thunk {
|
||||
public:
|
||||
CudnnBatchNormBackwardThunk(
|
||||
ThunkInfo thunk_info, CudnnBatchNormConfig&& config,
|
||||
ThunkInfo thunk_info, CudnnBatchNormConfig config,
|
||||
const BufferAllocation::Slice& operand,
|
||||
const BufferAllocation::Slice& scale, const BufferAllocation::Slice& mean,
|
||||
const BufferAllocation::Slice& inv_stddev,
|
||||
|
@ -43,7 +43,7 @@ GpuGemmConfig GetGpuGemmConfig(const HloInstruction *gemm) {
|
||||
return config;
|
||||
}
|
||||
|
||||
GemmThunk::GemmThunk(ThunkInfo thunk_info, GpuGemmConfig &&config,
|
||||
GemmThunk::GemmThunk(ThunkInfo thunk_info, GpuGemmConfig config,
|
||||
const BufferAllocation::Slice &lhs_buffer,
|
||||
const BufferAllocation::Slice &rhs_buffer,
|
||||
const BufferAllocation::Slice &output_buffer,
|
||||
|
@ -48,7 +48,7 @@ class GemmThunk : public Thunk {
|
||||
public:
|
||||
// Constructs a thunk that computes "output = (lhs <dot> rhs) * alpha" using
|
||||
// BLAS gemm (alpha is stored in the instruction GemmBackendConfig).
|
||||
GemmThunk(ThunkInfo thunk_info, GpuGemmConfig&& config,
|
||||
GemmThunk(ThunkInfo thunk_info, GpuGemmConfig config,
|
||||
const BufferAllocation::Slice& lhs_buffer,
|
||||
const BufferAllocation::Slice& rhs_buffer,
|
||||
const BufferAllocation::Slice& output_buffer,
|
||||
|
@ -27,7 +27,7 @@ namespace xla {
|
||||
namespace gpu {
|
||||
|
||||
InfeedThunk::InfeedThunk(ThunkInfo thunk_info,
|
||||
std::vector<ShapedSlice>&& dest_slices)
|
||||
std::vector<ShapedSlice> dest_slices)
|
||||
: Thunk(Kind::kInfeed, thunk_info), dest_slices_(std::move(dest_slices)) {}
|
||||
|
||||
Status InfeedThunk::ExecuteOnStream(const ExecuteParams& params) {
|
||||
|
@ -34,7 +34,7 @@ class InfeedThunk : public Thunk {
|
||||
public:
|
||||
// Constructs a InfeedThunk that copies data from the on-device
|
||||
// infeed queue into the buffers in the given shape tree.
|
||||
InfeedThunk(ThunkInfo thunk_info, std::vector<ShapedSlice>&& dest_slices);
|
||||
InfeedThunk(ThunkInfo thunk_info, std::vector<ShapedSlice> dest_slices);
|
||||
|
||||
InfeedThunk(const InfeedThunk&) = delete;
|
||||
InfeedThunk& operator=(const InfeedThunk&) = delete;
|
||||
|
Loading…
x
Reference in New Issue
Block a user