-
Notifications
You must be signed in to change notification settings - Fork 74
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
[Wait for #2591][Mixed] Support MSELoss - Mixed Precision #2604
base: main
Are you sure you want to change the base?
Commits on May 23, 2024
-
[ Weight ] Add Var32 Tensor in Weight.
We will add Var32 Tensor if the Variable Weight is not Full precision (FP32). This eables the Weight Update with full precision and only Apply Gradient Process ueses this Tensor. Therefore, the lifespan of this tensor should be "ApplyGradient". . Modify TensorPool to generate Weigth considering Mixed Precsion. **Self evaluation:** 1. Build test: [X]Passed [ ]Failed [ ]Skipped 2. Run test: [X]Passed [ ]Failed [ ]Skipped Signed-off-by: jijoong.moon <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9efb873 - Browse repository at this point
Copy the full SHA 9efb873View commit details -
[ Mixed ] Create weight with var32 tensor
This pr create the variable fp32 tensor when we create the Weight and Optimizer Weight. . update the manager to create Weight with var32 tensor which requested to weight pool. . update the weight requests with Weight Spec and var, grad and var32 tensors which created already. . add clone Tensor with specific type in tensor.h Resolves: **Self evaluation:** 1. Build test: [X]Passed [ ]Failed [ ]Skipped 2. Run test: [X]Passed [ ]Failed [ ]Skipped Signed-off-by: jijoong.moon <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 717dba6 - Browse repository at this point
Copy the full SHA 717dba6View commit details -
[ Layers ] Update Layers to support FP16
This PR enables the FP16 support for the layers below: . input layer . mse loss layer Resolves: **Self evaluation:** 1. Build test: [X]Passed [ ]Failed [ ]Skipped 2. Run test: [X]Passed [ ]Failed [ ]Skipped Signed-off-by: jijoong.moon <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6dc8a05 - Browse repository at this point
Copy the full SHA 6dc8a05View commit details -
[ Test ] Mixed Precision Test Case
This PR includes the mixed precision test case. . Input - FC - MSE : "batch_size=2", "model_tensor_type=FP16-FP16", "loss_scale=128" **Self evaluation:** 1. Build test: [X]Passed [ ]Failed [ ]Skipped 2. Run test: [X]Passed [ ]Failed [ ]Skipped Signed-off-by: jijoong.moon <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b86d833 - Browse repository at this point
Copy the full SHA b86d833View commit details -
[ Optimizer ] Update Optimizer / Adam to support Mixed training
This commit modify apply gradient in optimizer. We do not need to save optimizer variables in weight type. Only Optimizer needs the optimizer variables and we should update the weight with full precision to maintain the accuracy. Therefore, remove the var32 tensors for optimizer variables. Resolves: **Self evaluation:** 1. Build test: [X]Passed [ ]Failed [ ]Skipped 2. Run test: [X]Passed [ ]Failed [ ]Skipped Signed-off-by: jijoong.moon <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 47038cb - Browse repository at this point
Copy the full SHA 47038cbView commit details -
[ Tensor ] add is_NaN check in Tensor
This PR add is_NaN function to check if the tensor has NaN value. This is for the check NaN during mixed precision training. **Self evaluation:** 1. Build test: [X]Passed [ ]Failed [ ]Skipped 2. Run test: [X]Passed [ ]Failed [ ]Skipped Signed-off-by: jijoong.moon <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0e7884f - Browse repository at this point
Copy the full SHA 0e7884fView commit details -
[ Context ] Add loss scale in Context & using mse loss
This PR add loss scale parameter in runcontext and use it to update mse loss. . Add Loss Scale Parameter in RunLayerContext Constructor . Add applyLossScale func to update return derivitive in Loss Layer . Change MSE Loss Layer to apply the loss scale to return derivitive **Self evaluation:** 1. Build test: [X]Passed [ ]Failed [ ]Skipped 2. Run test: [X]Passed [ ]Failed [ ]Skipped Signed-off-by: jijoong.moon <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 36de26e - Browse repository at this point
Copy the full SHA 36de26eView commit details -
[ Mixed Precision ] Enable Mixed Precision
This PR enables the Mixed Precision Training. For now only FP16-FP32 is considered. Additional Test cases will be added. . add getSortedLayerIdx to set the graph order for fowarding. . change clip_weights to lazy_apply_weights to use both cases. . add fowarding_op to run forwarding from that layer which has a gradient with nan. . add while loop for re-run backwarding after reset the loss scale. . add setLossScale in RunLayerContext . add check the gradient if mixed precsion enable. **Self evaluation:** 1. Build test: [X]Passed [ ]Failed [ ]Skipped 2. Run test: [X]Passed [ ]Failed [ ]Skipped Signed-off-by: jijoong.moon <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c3f54ec - Browse repository at this point
Copy the full SHA c3f54ecView commit details -
[ Tensor ] Add inifinity check in Tensor
This PR add inifinity value check in Tensor data. . rename the hasNaN to isValid . add infinity check in isValid Function and now it check NaN and Inf . modify to check the blas_avx and blas_neon . modify graph and model check is_valid rather than has_nan . add unittest of isValid Function **Self evaluation:** 1. Build test: [X]Passed [ ]Failed [ ]Skipped 2. Run test: [X]Passed [ ]Failed [ ]Skipped Signed-off-by: jijoong.moon <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3f3a1bd - Browse repository at this point
Copy the full SHA 3f3a1bdView commit details -
[ MSE ] Fix for better MSE loss precision
This PR chage the loss computation using full precsion rather than half precsion to maintain accuracy. **Changes proposed in this PR:** - Added TOC generator for README.md Resolves: **Self evaluation:** 1. Build test: [X]Passed [ ]Failed [ ]Skipped 2. Run test: [X]Passed [ ]Failed [ ]Skipped Signed-off-by: jijoong.moon <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for eb2061f - Browse repository at this point
Copy the full SHA eb2061fView commit details -
[ TEST ] Add Torch Mixed Precision Model Test
This PR enables the Mixed Precsion Unittest with Torch Model. Resolves: **Self evaluation:** 1. Build test: [X]Passed [ ]Failed [ ]Skipped 2. Run test: [X]Passed [ ]Failed [ ]Skipped Signed-off-by: jijoong.moon <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0a4561e - Browse repository at this point
Copy the full SHA 0a4561eView commit details -
[ TEST ] add torch input and output test data for mixed precision
This PR add torch mixed precsion golden data generation and input and output for test. . some fixes to test. Resolves: **Self evaluation:** 1. Build test: [X]Passed [ ]Failed [ ]Skipped 2. Run test: [X]Passed [ ]Failed [ ]Skipped Signed-off-by: jijoong.moon <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ca3375e - Browse repository at this point
Copy the full SHA ca3375eView commit details -
[Mixed] Support MSELoss - Mixed Precision
enable mixed precision in MSE Loss **Self evaluation:** 1. Build test: [X]Passed [ ]Failed [ ]Skipped 2. Run test: [X]Passed [ ]Failed [ ]Skipped Signed-off-by: Donghak PARK <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2f6b205 - Browse repository at this point
Copy the full SHA 2f6b205View commit details