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

[zero] add chunk init function for users #1729

Merged
merged 4 commits into from Oct 18, 2022
Merged

[zero] add chunk init function for users #1729

merged 4 commits into from Oct 18, 2022

Conversation

1SAA
Copy link
Contributor

@1SAA 1SAA commented Oct 18, 2022

No description provided.

colossalai/gemini/chunk/search_utils.py Show resolved Hide resolved
params_size = [p.numel() for p in model.parameters() if in_ddp(p)]
params_size_arr = np.array(params_size)

std = np.std(params_size_arr)
Copy link
Contributor

Choose a reason for hiding this comment

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

why not use torch.std? is it necessary to conver it to np?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know. @ver217 wrote this code.

colossalai/gemini/chunk/search_utils.py Show resolved Hide resolved
colossalai/gemini/chunk/search_utils.py Show resolved Hide resolved
colossalai/gemini/chunk/search_utils.py Show resolved Hide resolved
wasted_size /= 1024**2

if dist.get_rank() == 0:
print("searching chunk configuration is completed in {:.2f} s.\n".format(span_s),
Copy link
Contributor

Choose a reason for hiding this comment

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

print_rank_0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

print_rank_0 is not robust enough to print multiple strings. it is only able to print a single string.

@1SAA 1SAA merged commit f69f9bf into hpcaitech:main Oct 18, 2022
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.

None yet

2 participants