From bde20f126aa29abfaef3bbc2add7260cec2f932c Mon Sep 17 00:00:00 2001 From: cabbage Date: Wed, 9 Aug 2023 15:11:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0copy=20right?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tb_plugins/profiling/tb_plugin/setup.py | 17 +++++++++++++++++ .../tb_plugin/torch_tb_profiler/consts.py | 17 +++++++++++++++++ .../tb_plugin/torch_tb_profiler/plugin.py | 17 +++++++++++++++++ .../torch_tb_profiler/profiler/data.py | 17 +++++++++++++++++ .../torch_tb_profiler/profiler/loader.py | 17 +++++++++++++++++ .../torch_tb_profiler/profiler/run_generator.py | 17 +++++++++++++++++ .../tb_plugin/torch_tb_profiler/run.py | 17 +++++++++++++++++ .../tb_plugin/torch_tb_profiler/utils.py | 17 +++++++++++++++++ 8 files changed, 136 insertions(+) diff --git a/tb_plugins/profiling/tb_plugin/setup.py b/tb_plugins/profiling/tb_plugin/setup.py index 70d074ca5..7cc417e1c 100644 --- a/tb_plugins/profiling/tb_plugin/setup.py +++ b/tb_plugins/profiling/tb_plugin/setup.py @@ -1,5 +1,22 @@ # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. +# +# Copyright(c) 2023 Huawei Technologies. +# All rights reserved +# +# 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 +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# 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. +# +# Modifications: Add visualization of PyTorch Ascend profiling. # -------------------------------------------------------------------------- import os import pathlib diff --git a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/consts.py b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/consts.py index 4fced0bfe..460f50819 100644 --- a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/consts.py +++ b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/consts.py @@ -1,5 +1,22 @@ # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. +# +# Copyright(c) 2023 Huawei Technologies. +# All rights reserved +# +# 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 +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# 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. +# +# Modifications: Add visualization of PyTorch Ascend profiling. # -------------------------------------------------------------------------- import re from collections import namedtuple diff --git a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/plugin.py b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/plugin.py index fcfaf7860..f8d41c158 100644 --- a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/plugin.py +++ b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/plugin.py @@ -1,5 +1,22 @@ # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. +# +# Copyright(c) 2023 Huawei Technologies. +# All rights reserved +# +# 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 +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# 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. +# +# Modifications: Add visualization of PyTorch Ascend profiling. # -------------------------------------------------------------------------- import atexit import copy diff --git a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/data.py b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/data.py index f699f43b0..3a7e8ad1e 100644 --- a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/data.py +++ b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/data.py @@ -1,5 +1,22 @@ # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. +# +# Copyright(c) 2023 Huawei Technologies. +# All rights reserved +# +# 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 +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# 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. +# +# Modifications: Add visualization of PyTorch Ascend profiling. # -------------------------------------------------------------------------- import gzip import io as sysio diff --git a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/loader.py b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/loader.py index 32a7ce323..fa3b1ae29 100644 --- a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/loader.py +++ b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/loader.py @@ -1,5 +1,22 @@ # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. +# +# Copyright(c) 2023 Huawei Technologies. +# All rights reserved +# +# 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 +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# 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. +# +# Modifications: Add visualization of PyTorch Ascend profiling. # -------------------------------------------------------------------------- import bisect import os diff --git a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/run_generator.py b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/run_generator.py index 09e38c03e..b6a40f05e 100644 --- a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/run_generator.py +++ b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/profiler/run_generator.py @@ -1,5 +1,22 @@ # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. +# +# Copyright(c) 2023 Huawei Technologies. +# All rights reserved +# +# 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 +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# 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. +# +# Modifications: Add visualization of PyTorch Ascend profiling. # -------------------------------------------------------------------------- from collections import OrderedDict, defaultdict from typing import Dict, Iterable, List diff --git a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/run.py b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/run.py index 7d4e23503..a51c9f928 100644 --- a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/run.py +++ b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/run.py @@ -1,5 +1,22 @@ # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. +# +# Copyright(c) 2023 Huawei Technologies. +# All rights reserved +# +# 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 +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# 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. +# +# Modifications: Add visualization of PyTorch Ascend profiling. # -------------------------------------------------------------------------- from collections import defaultdict from typing import Any, Dict, Iterable, List, Optional, Tuple, Union diff --git a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/utils.py b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/utils.py index 7bd6e42bf..9bd488e2b 100644 --- a/tb_plugins/profiling/tb_plugin/torch_tb_profiler/utils.py +++ b/tb_plugins/profiling/tb_plugin/torch_tb_profiler/utils.py @@ -1,5 +1,22 @@ # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. +# +# Copyright(c) 2023 Huawei Technologies. +# All rights reserved +# +# 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 +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# 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. +# +# Modifications: Add visualization of PyTorch Ascend profiling. # -------------------------------------------------------------------------- import logging import math -- Gitee