[fx] add more op patches for profiler and error message for unsupported ops.#1495
Merged
super-dainiu merged 52 commits intohpcaitech:mainfrom Aug 25, 2022
super-dainiu:feature/profiler
Merged
[fx] add more op patches for profiler and error message for unsupported ops.#1495super-dainiu merged 52 commits intohpcaitech:mainfrom super-dainiu:feature/profiler
super-dainiu merged 52 commits intohpcaitech:mainfrom
super-dainiu:feature/profiler
Conversation
…on checkpointing usages
…on checkpointing usages
…on checkpointing usages
* [fx] activation checkpointing using Chen strategies. * [fx] add test for ckpt_solver_chen * [fx] add vanilla activation checkpoint search with test on resnet and densenet * [fx] add a namespace code for solver_chen. * [fx] fix the false interpretation of algorithm 3 in https://arxiv.org/abs/1604.06174. * [fx] fix lowercase naming conventions. * [fx] simplify test for ckpt.
* [fx] modify the calculation of node_size in MetaInfoProp for activation checkpointing usages * [fx] modify the calculation of node_size in MetaInfoProp for activation checkpointing usages * [fx] modify the calculation of node_size in MetaInfoProp for activation checkpointing usages * [fx] merge development into main (#1) * [fx] activation checkpointing using Chen strategies. * [fx] add test for ckpt_solver_chen * [fx] add vanilla activation checkpoint search with test on resnet and densenet * [fx] add a namespace code for solver_chen. * [fx] fix the false interpretation of algorithm 3 in https://arxiv.org/abs/1604.06174. * [fx] fix lowercase naming conventions. * [fx] simplify test for ckpt. * [fx] fix test and algorithm bugs in activation checkpointing. * [fx] polish ckpt_test. * [fx] add rules to linearize computation graphs for searching.
…ColossalAI into feature/linear_ckpt
…ColossalAI into feature/linear_ckpt
…ossalAI into feature/profiler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's new?
Now our profiler can profile any model from torchvision library. I also added error message and guide for unsupported ops.
Concerns
This profiler is not able to detect temporary memory cost within one node. For example,
nn.Conv2d()has extra memory reserved for the allocator, and the amount varies according to different types of devices (https://dl.acm.org/doi/10.1145/3368089.3417050). Also, I did not consider the extra memory cost when computingnn.MultiheadAttention. Some problems can be solved by refractoring, but we have to withstand the inaccuracies.