@@ -817,11 +817,11 @@ std::shared_ptr<ProcessGroup::Task> ProcessGroupFlagcx::Collective(
817
817
if (use_calc_stream) {
818
818
auto calc_stream = calc_ctx->stream ();
819
819
flagcx_comm_ctx->flagcx_handler_ ->devHandle ->streamCopy (
820
- &flagcx_stream, ( void *) &calc_stream);
820
+ &flagcx_stream, reinterpret_cast < void *>( &calc_stream) );
821
821
} else {
822
822
auto comm_stream = comm_ctx->stream ();
823
823
flagcx_comm_ctx->flagcx_handler_ ->devHandle ->streamCopy (
824
- &flagcx_stream, ( void *) &comm_stream);
824
+ &flagcx_stream, reinterpret_cast < void *>( &comm_stream) );
825
825
}
826
826
827
827
if (!FLAGS_enable_async_trace) {
@@ -831,8 +831,8 @@ std::shared_ptr<ProcessGroup::Task> ProcessGroupFlagcx::Collective(
831
831
if (!use_calc_stream) {
832
832
if (!is_coalescing_) {
833
833
task->UpdateWaitChain (*comm_ctx);
834
- allocation_stream_pairs_.emplace_back (tensor. Holder (),
835
- *( gpuStream_t*) flagcx_stream);
834
+ allocation_stream_pairs_.emplace_back (
835
+ tensor. Holder (), * reinterpret_cast < gpuStream_t*>( flagcx_stream) );
836
836
} else {
837
837
coalescing_tensors_.emplace_back (
838
838
std::make_shared<phi::DenseTensor>(tensor));
@@ -906,11 +906,11 @@ std::shared_ptr<ProcessGroup::Task> ProcessGroupFlagcx::Point2Point(
906
906
if (use_calc_stream) {
907
907
auto calc_stream = calc_ctx->stream ();
908
908
flagcx_comm_ctx->flagcx_handler_ ->devHandle ->streamCopy (
909
- &flagcx_stream, ( void *) &calc_stream);
909
+ &flagcx_stream, reinterpret_cast < void *>( &calc_stream) );
910
910
} else {
911
911
auto comm_stream = comm_ctx->stream ();
912
912
flagcx_comm_ctx->flagcx_handler_ ->devHandle ->streamCopy (
913
- &flagcx_stream, ( void *) &comm_stream);
913
+ &flagcx_stream, reinterpret_cast < void *>( &comm_stream) );
914
914
}
915
915
916
916
if (!FLAGS_enable_async_trace) {
@@ -920,8 +920,8 @@ std::shared_ptr<ProcessGroup::Task> ProcessGroupFlagcx::Point2Point(
920
920
if (!use_calc_stream) {
921
921
if (!is_coalescing_) {
922
922
task->UpdateWaitChain (*comm_ctx);
923
- allocation_stream_pairs_.emplace_back (tensor. Holder (),
924
- *( gpuStream_t*) flagcx_stream);
923
+ allocation_stream_pairs_.emplace_back (
924
+ tensor. Holder (), * reinterpret_cast < gpuStream_t*>( flagcx_stream) );
925
925
} else {
926
926
coalescing_tensors_.emplace_back (
927
927
std::make_shared<phi::DenseTensor>(tensor));
@@ -1008,11 +1008,11 @@ void ProcessGroupFlagcx::EndCoalescing(
1008
1008
auto comm_stream = comm_ctx->stream ();
1009
1009
flagcxStream_t flagcx_stream;
1010
1010
flagcx_comm_ctx->flagcx_handler_ ->devHandle ->streamCopy (
1011
- &flagcx_stream, ( void *) &comm_stream);
1011
+ &flagcx_stream, reinterpret_cast < void *>( &comm_stream) );
1012
1012
1013
1013
flagcx_task->UpdateWaitChain (*comm_ctx);
1014
- allocation_stream_pairs_.emplace_back (tensor-> Holder (),
1015
- *( gpuStream_t*) flagcx_stream);
1014
+ allocation_stream_pairs_.emplace_back (
1015
+ tensor-> Holder (), * reinterpret_cast < gpuStream_t*>( flagcx_stream) );
1016
1016
flagcx_comm_ctx->flagcx_handler_ ->devHandle ->streamFree (flagcx_stream);
1017
1017
}
1018
1018
0 commit comments