Skip to content

Commit

Permalink
Update DeepSpeed copyright license to Apache 2.0 (microsoft#3111)
Browse files Browse the repository at this point in the history
Co-authored-by: Jeff Rasley <jerasley@microsoft.com>
  • Loading branch information
mrwyattii and jeffra committed Mar 31, 2023
1 parent 261d637 commit b361c72
Show file tree
Hide file tree
Showing 508 changed files with 2,247 additions and 1,045 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ repos:
name: check-license
entry: ./scripts/check-license.py
language: script
files: \.(py|cc|cu|h|cuh|hip)$
files: \.(py|c|cpp|cu|cc|h|hpp|cuh|hip|tr)$

- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
Expand Down
28 changes: 10 additions & 18 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
MIT License
Copyright 2023 Microsoft Corporation

Copyright (c) Microsoft Corporation.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
http://www.apache.org/licenses/LICENSE-2.0

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
5 changes: 4 additions & 1 deletion accelerator/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
'''Copyright The Microsoft DeepSpeed Team'''
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0

# DeepSpeed Team

from .abstract_accelerator import DeepSpeedAccelerator
from .real_accelerator import get_accelerator, set_accelerator
5 changes: 4 additions & 1 deletion accelerator/abstract_accelerator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
'''Copyright The Microsoft DeepSpeed Team'''
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0

# DeepSpeed Team

import abc
from abc import ABC
Expand Down
5 changes: 4 additions & 1 deletion accelerator/cuda_accelerator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
'''Copyright The Microsoft DeepSpeed Team'''
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0

# DeepSpeed Team

import os
import pkgutil
Expand Down
5 changes: 4 additions & 1 deletion accelerator/real_accelerator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
'''Copyright The Microsoft DeepSpeed Team'''
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0

# DeepSpeed Team

try:
from accelerator.abstract_accelerator import DeepSpeedAccelerator as dsa1
Expand Down
4 changes: 4 additions & 0 deletions benchmarks/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0

# DeepSpeed Team
'''Copyright The Microsoft DeepSpeed Team'''
4 changes: 4 additions & 0 deletions benchmarks/communication/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0

# DeepSpeed Team
'''Copyright The Microsoft DeepSpeed Team'''
5 changes: 4 additions & 1 deletion benchmarks/communication/all_gather.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
'''Copyright The Microsoft DeepSpeed Team'''
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0

# DeepSpeed Team

import torch
import sys, os, time
Expand Down
5 changes: 4 additions & 1 deletion benchmarks/communication/all_reduce.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
'''Copyright The Microsoft DeepSpeed Team'''
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0

# DeepSpeed Team

import torch
import sys, os, time
Expand Down
5 changes: 4 additions & 1 deletion benchmarks/communication/all_to_all.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
'''Copyright The Microsoft DeepSpeed Team'''
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0

# DeepSpeed Team

import torch
import sys, os, time
Expand Down
5 changes: 4 additions & 1 deletion benchmarks/communication/broadcast.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
'''Copyright The Microsoft DeepSpeed Team'''
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0

# DeepSpeed Team

import torch
import sys, os, time
Expand Down
6 changes: 5 additions & 1 deletion benchmarks/communication/constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
'''Copyright The Microsoft DeepSpeed Team'''
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0

# DeepSpeed Team

from deepspeed.accelerator import get_accelerator

DEFAULT_WARMUPS = 5
Expand Down
5 changes: 4 additions & 1 deletion benchmarks/communication/pt2pt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
'''Copyright The Microsoft DeepSpeed Team'''
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0

# DeepSpeed Team

import torch
import sys, os, time
Expand Down
5 changes: 4 additions & 1 deletion benchmarks/communication/run_all.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
'''Copyright The Microsoft DeepSpeed Team'''
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0

# DeepSpeed Team

import sys, os

Expand Down
5 changes: 4 additions & 1 deletion benchmarks/communication/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
'''Copyright The Microsoft DeepSpeed Team'''
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0

# DeepSpeed Team

import torch
import os, sys
Expand Down
5 changes: 4 additions & 1 deletion benchmarks/inference/bert-bench.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
'''Copyright The Microsoft DeepSpeed Team'''
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0

# DeepSpeed Team

import torch
import time
Expand Down
5 changes: 4 additions & 1 deletion benchmarks/inference/collect_results.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
'''Copyright The Microsoft DeepSpeed Team'''
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0

# DeepSpeed Team

import os
import re
Expand Down
5 changes: 4 additions & 1 deletion benchmarks/inference/gpt-bench.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
'''Copyright The Microsoft DeepSpeed Team'''
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0

# DeepSpeed Team

import os
import torch
Expand Down
5 changes: 5 additions & 0 deletions csrc/adagrad/cpu_adagrad.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0

// DeepSpeed Team

#include "cpu_adagrad.h"
#include <torch/extension.h>
#include <iostream>
Expand Down
5 changes: 5 additions & 0 deletions csrc/adam/cpu_adam.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0

// DeepSpeed Team

#include "cpu_adam.h"
#include <torch/extension.h>
#include <cassert>
Expand Down
5 changes: 5 additions & 0 deletions csrc/adam/fused_adam_frontend.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0

// DeepSpeed Team

#include <torch/extension.h>

void multi_tensor_adam_cuda(int chunk_size,
Expand Down
11 changes: 8 additions & 3 deletions csrc/adam/multi_tensor_adam.cu
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
/* Copyright 2020 The Microsoft DeepSpeed Team
Copyright NVIDIA/apex
This file is adapted from fused adam in NVIDIA/apex, commit a109f85
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0

// DeepSpeed Team

/*
Copyright NVIDIA/apex
This file is adapted from fused adam in NVIDIA/apex, commit a109f85
*/

#include <ATen/ATen.h>
Expand Down
11 changes: 8 additions & 3 deletions csrc/adam/multi_tensor_apply.cuh
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
/* Copyright 2020 The Microsoft DeepSpeed Team
Copyright NVIDIA/apex
This file is adapted from fused adam in NVIDIA/apex, commit a109f85
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0

// DeepSpeed Team

/*
Copyright NVIDIA/apex
This file is adapted from fused adam in NVIDIA/apex, commit a109f85
*/

#include <ATen/ATen.h>
Expand Down
8 changes: 5 additions & 3 deletions csrc/aio/common/deepspeed_aio_common.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/*
Copyright 2020 The Microsoft DeepSpeed Team
Licensed under the MIT license.
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0

// DeepSpeed Team

/*
Functionality for swapping optimizer tensors to/from (NVMe) storage devices.
*/

Expand Down
8 changes: 5 additions & 3 deletions csrc/aio/common/deepspeed_aio_common.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/*
Copyright 2020 The Microsoft DeepSpeed Team
Licensed under the MIT license.
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0

// DeepSpeed Team

/*
Functionality for swapping optimizer tensors to/from (NVMe) storage devices.
*/

Expand Down
8 changes: 5 additions & 3 deletions csrc/aio/common/deepspeed_aio_types.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/*
Copyright 2020 The Microsoft DeepSpeed Team
Licensed under the MIT license.
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0

// DeepSpeed Team

/*
Functionality for swapping optimizer tensors to/from (NVMe) storage devices.
*/

Expand Down
8 changes: 5 additions & 3 deletions csrc/aio/common/deepspeed_aio_types.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/*
Copyright 2020 The Microsoft DeepSpeed Team
Licensed under the MIT license.
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0

// DeepSpeed Team

/*
Functionality for swapping optimizer tensors to/from (NVMe) storage devices.
*/

Expand Down
8 changes: 5 additions & 3 deletions csrc/aio/common/deepspeed_aio_utils.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/*
Copyright 2020 The Microsoft DeepSpeed Team
Licensed under the MIT license.
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0

// DeepSpeed Team

/*
Functionality for swapping optimizer tensors to/from (NVMe) storage devices.
*/

Expand Down
8 changes: 5 additions & 3 deletions csrc/aio/common/deepspeed_aio_utils.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/*
Copyright 2020 The Microsoft DeepSpeed Team
Licensed under the MIT license.
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0

// DeepSpeed Team

/*
Functionality for swapping optimizer tensors to/from (NVMe) storage devices.
*/

Expand Down
8 changes: 5 additions & 3 deletions csrc/aio/py_lib/deepspeed_aio_thread.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/*
Copyright 2020 The Microsoft DeepSpeed Team
Licensed under the MIT license.
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0

// DeepSpeed Team

/*
Functionality for swapping optimizer tensors to/from (NVMe) storage devices.
*/

Expand Down
8 changes: 5 additions & 3 deletions csrc/aio/py_lib/deepspeed_aio_thread.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/*
Copyright 2020 The Microsoft DeepSpeed Team
Licensed under the MIT license.
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0

// DeepSpeed Team

/*
Functionality for swapping optimizer tensors to/from (NVMe) storage devices.
*/

Expand Down
8 changes: 5 additions & 3 deletions csrc/aio/py_lib/deepspeed_pin_tensor.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/*
Copyright 2023 The Microsoft DeepSpeed Team
Licensed under the MIT license.
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0

// DeepSpeed Team

/*
Functionality for managing CPU tensors occupying page-locked memory.
*/

Expand Down
13 changes: 8 additions & 5 deletions csrc/aio/py_lib/deepspeed_pin_tensor.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
/*
Copyright 2023 The Microsoft DeepSpeed Team
Licensed under the MIT license.
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0

// DeepSpeed Team

/*
Functionality for managing CPU tensors occupying page-locked memory.
TODO: Implement a full-featured manager that
1. Avoid page-locked memory leaks
2. Minimize page-locked memory usage by reducing internal fragmentation
1. Avoid page-locked memory leaks
2. Minimize page-locked memory usage by reducing internal fragmentation
Functionality for managing CPU tensors occupying page-locked memory.
*/

#include <map>
Expand Down
4 changes: 4 additions & 0 deletions csrc/aio/py_lib/deepspeed_py_aio.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0

// DeepSpeed Team

/*
Copyright 2020 The Microsoft DeepSpeed Team
Expand Down
4 changes: 4 additions & 0 deletions csrc/aio/py_lib/deepspeed_py_aio.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0

// DeepSpeed Team

/*
Copyright 2020 The Microsoft DeepSpeed Team
Expand Down
Loading

0 comments on commit b361c72

Please sign in to comment.