diff --git a/tb_plugins/profiling/tb_plugin/setup.py b/tb_plugins/profiling/tb_plugin/setup.py index 70d074ca5f87fec78a9287dd6895ef79d51bd98c..7cc417e1cdb6983ce736dcdcc89e08a27b04df50 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 4fced0bfe646c663573c1abb126e9966d535a2ca..460f508190223790ce056973c910166ea887b6f0 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 fcfaf7860da0809bbeb730ace79aaf766cd6a386..f8d41c15879d9a03f5921c22d9e3237ee2fb9ea7 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 f699f43b0fe0c72ad0cd859502efc979b04110e3..3a7e8ad1ec5f9e33c83632271b2e34035649c23f 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 32a7ce3230537682154bb004dc6ab1ae937ab97b..fa3b1ae29187c1911236203c46bbc5e514966ed1 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 09e38c03e590d66cac90aea9a691ea04a382d55c..b6a40f05e435a12d9c5703fb8e1e51901de4836d 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 7d4e23503f0f20bc50fe09a3b2cc5375150985f4..a51c9f928fc1a7c77cc0f7d2a406c1e914c27cf3 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 7bd6e42bfa42898bd782bb0db5980f9d59fa4c3b..9bd488e2bf149b19c796050b4bad9b1683f45191 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