Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add trace hang function #59217

Merged
merged 13 commits into from
Nov 28, 2023
Merged

Add trace hang function #59217

merged 13 commits into from
Nov 28, 2023

Conversation

hitywt
Copy link

@hitywt hitywt commented Nov 21, 2023

PR types

Others

PR changes

Others

Description

Pcard-70448

  1. Add trace hang function.
  2. Enable trace hang function by setting environment variable FLAGS_enable_async_trace=True

LiYuRio
LiYuRio previously approved these changes Nov 24, 2023
Copy link
Contributor

@LiYuRio LiYuRio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


int* gpu_global_ranks = nullptr;
size_t gpu_global_ranks_size = num_ranks * sizeof(int);
CUDA_CHECK(cudaMalloc(&gpu_global_ranks, gpu_global_ranks_size));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么不走框架的显存分配,而是裸调cudaapi

Copy link
Author

@hitywt hitywt Nov 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么不走框架的显存分配,而是裸调cudaapi

这里不需要使用tensor、stream、上下文等,没有必要使用更复杂的封装实现吧

wentaoyu and others added 11 commits November 24, 2023 17:00
* fix trace hang

* fix compile error

* fix code style

* tinyfix

* tiny update

* fix code style

---------

Co-authored-by: ForFishes <1422485404@qq.com>
* fix nccl_async_trace destruct problem when train finished

* update

* format code style
ForFishes
ForFishes previously approved these changes Nov 27, 2023
Copy link
Member

@ForFishes ForFishes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hitywt hitywt marked this pull request as draft November 27, 2023 05:17
@hitywt hitywt marked this pull request as ready for review November 27, 2023 05:17
Copy link
Member

@ForFishes ForFishes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ForFishes ForFishes merged commit da313d7 into PaddlePaddle:develop Nov 28, 2023
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants