-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DeepSpeed JIT op + PyPI support (#496)
Co-authored-by: Shaden Smith <[email protected]> Co-authored-by: Reza Yazdani <[email protected]>
- Loading branch information
1 parent
0ad4fd8
commit 31f46fe
Showing
59 changed files
with
1,673 additions
and
681 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
global-include *.cpp *.h *.cu *.tr *.cuh *.cc *.txt |
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env python | ||
|
||
from deepspeed.env_report import main | ||
|
||
if __name__ == '__main__': | ||
main() |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* Copyright 2020 The Microsoft DeepSpeed Team | ||
Copyright NVIDIA/apex | ||
This file is adapted from fused adam in NVIDIA/apex, commit a109f85 | ||
*/ | ||
|
||
#ifndef TORCH_CHECK | ||
#define TORCH_CHECK AT_CHECK | ||
#endif | ||
|
||
#ifdef VERSION_GE_1_3 | ||
#define DATA_PTR data_ptr | ||
#else | ||
#define DATA_PTR data | ||
#endif |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <torch/extension.h> | ||
|
||
void multi_tensor_adam_cuda(int chunk_size, | ||
at::Tensor noop_flag, | ||
std::vector<std::vector<at::Tensor>> tensor_lists, | ||
const float lr, | ||
const float beta1, | ||
const float beta2, | ||
const float epsilon, | ||
const int step, | ||
const int mode, | ||
const int bias_correction, | ||
const float weight_decay); | ||
|
||
PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) | ||
{ | ||
m.def("multi_tensor_adam", | ||
&multi_tensor_adam_cuda, | ||
"Compute and apply gradient update to parameters for Adam optimizer"); | ||
} |
Oops, something went wrong.