From 8157437273fe1316b8b3b034744660cef072aeb8 Mon Sep 17 00:00:00 2001 From: Julian Jose Date: Fri, 12 Sep 2025 23:47:58 +0530 Subject: [PATCH] [Palamida scan] SWDEV-553054 Adding missing copyrights information (#900) * Add missing copyright headers in rocprofiler-systems * Update python-tests * Update causal test --------- Co-authored-by: David Galiffi --- .../examples/causal/causal.cpp | 3 ++ .../examples/code-coverage/code-coverage.cpp | 2 + .../examples/code-coverage/code-coverage.py | 3 ++ .../examples/fork/fork.cpp | 2 + .../parallel-overhead/parallel-overhead.cpp | 2 + .../examples/python/builtin.py | 3 ++ .../examples/python/external.py | 3 ++ .../examples/python/fill.py | 3 ++ .../examples/python/noprofile.py | 3 ++ .../examples/python/source-numpy.py | 3 ++ .../examples/python/source.py | 3 ++ .../rccl/rccl-tests/src/git_version.h | 7 +++ .../examples/rccl/rccl-tests/src/timer.cc | 7 +++ .../examples/rccl/rccl-tests/src/timer.h | 7 +++ .../rewrite-caller/rewrite-caller.cpp | 3 ++ .../trace-time-window/trace-time-window.cpp | 3 ++ .../examples/user-api/user-api.cpp | 2 + .../scripts/gperftools-cpu-profile.sh | 3 ++ .../scripts/rocprof-sys-launch-compiler | 23 +++++++++ .../tests/rocprof-sys-causal-tests.cmake | 41 +++++----------- .../tests/rocprof-sys-python-tests.cmake | 49 ++++++------------- 21 files changed, 111 insertions(+), 64 deletions(-) diff --git a/projects/rocprofiler-systems/examples/causal/causal.cpp b/projects/rocprofiler-systems/examples/causal/causal.cpp index a8a98a996f..55a29d92a1 100644 --- a/projects/rocprofiler-systems/examples/causal/causal.cpp +++ b/projects/rocprofiler-systems/examples/causal/causal.cpp @@ -1,3 +1,6 @@ +// Copyright (c) Advanced Micro Devices, Inc. +// SPDX-License-Identifier: MIT + #include "causal.hpp" #include "impl.hpp" diff --git a/projects/rocprofiler-systems/examples/code-coverage/code-coverage.cpp b/projects/rocprofiler-systems/examples/code-coverage/code-coverage.cpp index 2e3c37c3df..538b8ff685 100644 --- a/projects/rocprofiler-systems/examples/code-coverage/code-coverage.cpp +++ b/projects/rocprofiler-systems/examples/code-coverage/code-coverage.cpp @@ -1,3 +1,5 @@ +// Copyright (c) Advanced Micro Devices, Inc. +// SPDX-License-Identifier: MIT #include #include diff --git a/projects/rocprofiler-systems/examples/code-coverage/code-coverage.py b/projects/rocprofiler-systems/examples/code-coverage/code-coverage.py index 9dae8beefb..a9ff4ed646 100644 --- a/projects/rocprofiler-systems/examples/code-coverage/code-coverage.py +++ b/projects/rocprofiler-systems/examples/code-coverage/code-coverage.py @@ -1,5 +1,8 @@ #!@PYTHON_EXECUTABLE@ +# Copyright (c) Advanced Micro Devices, Inc. +# SPDX-License-Identifier: MIT + import rocprofsys import argparse diff --git a/projects/rocprofiler-systems/examples/fork/fork.cpp b/projects/rocprofiler-systems/examples/fork/fork.cpp index fda89412b0..83b16481d1 100644 --- a/projects/rocprofiler-systems/examples/fork/fork.cpp +++ b/projects/rocprofiler-systems/examples/fork/fork.cpp @@ -1,3 +1,5 @@ +// Copyright (c) Advanced Micro Devices, Inc. +// SPDX-License-Identifier: MIT #include diff --git a/projects/rocprofiler-systems/examples/parallel-overhead/parallel-overhead.cpp b/projects/rocprofiler-systems/examples/parallel-overhead/parallel-overhead.cpp index 1eca62b4a5..9df521fc2d 100644 --- a/projects/rocprofiler-systems/examples/parallel-overhead/parallel-overhead.cpp +++ b/projects/rocprofiler-systems/examples/parallel-overhead/parallel-overhead.cpp @@ -1,3 +1,5 @@ +// Copyright (c) Advanced Micro Devices, Inc. +// SPDX-License-Identifier: MIT #include #include diff --git a/projects/rocprofiler-systems/examples/python/builtin.py b/projects/rocprofiler-systems/examples/python/builtin.py index 19c71f1a5a..1577cba0c8 100755 --- a/projects/rocprofiler-systems/examples/python/builtin.py +++ b/projects/rocprofiler-systems/examples/python/builtin.py @@ -1,5 +1,8 @@ #!@PYTHON_EXECUTABLE@ +# Copyright (c) Advanced Micro Devices, Inc. +# SPDX-License-Identifier: MIT + import os import sys import random diff --git a/projects/rocprofiler-systems/examples/python/external.py b/projects/rocprofiler-systems/examples/python/external.py index 99879d329b..3820335607 100755 --- a/projects/rocprofiler-systems/examples/python/external.py +++ b/projects/rocprofiler-systems/examples/python/external.py @@ -1,5 +1,8 @@ #!@PYTHON_EXECUTABLE@ +# Copyright (c) Advanced Micro Devices, Inc. +# SPDX-License-Identifier: MIT + import os import sys import random diff --git a/projects/rocprofiler-systems/examples/python/fill.py b/projects/rocprofiler-systems/examples/python/fill.py index c1d5de1bbf..6457b41aa8 100755 --- a/projects/rocprofiler-systems/examples/python/fill.py +++ b/projects/rocprofiler-systems/examples/python/fill.py @@ -1,5 +1,8 @@ #!@PYTHON_EXECUTABLE@ +# Copyright (c) Advanced Micro Devices, Inc. +# SPDX-License-Identifier: MIT + import os import sys import time diff --git a/projects/rocprofiler-systems/examples/python/noprofile.py b/projects/rocprofiler-systems/examples/python/noprofile.py index f2566f23ef..c628c625a2 100755 --- a/projects/rocprofiler-systems/examples/python/noprofile.py +++ b/projects/rocprofiler-systems/examples/python/noprofile.py @@ -1,5 +1,8 @@ #!@PYTHON_EXECUTABLE@ +# Copyright (c) Advanced Micro Devices, Inc. +# SPDX-License-Identifier: MIT + import os import sys import random diff --git a/projects/rocprofiler-systems/examples/python/source-numpy.py b/projects/rocprofiler-systems/examples/python/source-numpy.py index c008749241..634177157e 100755 --- a/projects/rocprofiler-systems/examples/python/source-numpy.py +++ b/projects/rocprofiler-systems/examples/python/source-numpy.py @@ -1,5 +1,8 @@ #!@PYTHON_EXECUTABLE@ +# Copyright (c) Advanced Micro Devices, Inc. +# SPDX-License-Identifier: MIT + import os import sys import time diff --git a/projects/rocprofiler-systems/examples/python/source.py b/projects/rocprofiler-systems/examples/python/source.py index 3ec7b9445b..a5ccc4aaa8 100755 --- a/projects/rocprofiler-systems/examples/python/source.py +++ b/projects/rocprofiler-systems/examples/python/source.py @@ -1,5 +1,8 @@ #!@PYTHON_EXECUTABLE@ +# Copyright (c) Advanced Micro Devices, Inc. +# SPDX-License-Identifier: MIT + import os import sys import time diff --git a/projects/rocprofiler-systems/examples/rccl/rccl-tests/src/git_version.h b/projects/rocprofiler-systems/examples/rccl/rccl-tests/src/git_version.h index f011e9daf7..6b87c25ea9 100644 --- a/projects/rocprofiler-systems/examples/rccl/rccl-tests/src/git_version.h +++ b/projects/rocprofiler-systems/examples/rccl/rccl-tests/src/git_version.h @@ -1,3 +1,10 @@ +/************************************************************************* + * Copyright (c) 2016-2022, NVIDIA CORPORATION. All rights reserved. + * Modifications Copyright (c) 2020-2022 Advanced Micro Devices, Inc. All rights reserved. + * + * See LICENSE.txt for license information + ************************************************************************/ + #ifndef RCCL_TESTS_GIT_VERSION_H_ #define RCCL_TESTS_GIT_VERSION_H_ diff --git a/projects/rocprofiler-systems/examples/rccl/rccl-tests/src/timer.cc b/projects/rocprofiler-systems/examples/rccl/rccl-tests/src/timer.cc index 5c4b03a385..8c0cdc4064 100644 --- a/projects/rocprofiler-systems/examples/rccl/rccl-tests/src/timer.cc +++ b/projects/rocprofiler-systems/examples/rccl/rccl-tests/src/timer.cc @@ -1,3 +1,10 @@ +/************************************************************************* + * Copyright (c) 2016-2022, NVIDIA CORPORATION. All rights reserved. + * Modifications Copyright (c) 2020-2022 Advanced Micro Devices, Inc. All rights reserved. + * + * See LICENSE.txt for license information + ************************************************************************/ + #include "timer.h" // Make sure to compile this translation unit with the host compiler and not diff --git a/projects/rocprofiler-systems/examples/rccl/rccl-tests/src/timer.h b/projects/rocprofiler-systems/examples/rccl/rccl-tests/src/timer.h index 6dd0424089..627e79b0c3 100644 --- a/projects/rocprofiler-systems/examples/rccl/rccl-tests/src/timer.h +++ b/projects/rocprofiler-systems/examples/rccl/rccl-tests/src/timer.h @@ -1,3 +1,10 @@ +/************************************************************************* + * Copyright (c) 2016-2022, NVIDIA CORPORATION. All rights reserved. + * Modifications Copyright (c) 2020-2022 Advanced Micro Devices, Inc. All rights reserved. + * + * See LICENSE.txt for license information + ************************************************************************/ + #ifndef _408319ecdd5b47b28bf8f511c4fdf816 #define _408319ecdd5b47b28bf8f511c4fdf816 diff --git a/projects/rocprofiler-systems/examples/rewrite-caller/rewrite-caller.cpp b/projects/rocprofiler-systems/examples/rewrite-caller/rewrite-caller.cpp index ae81749de7..ac5e524610 100644 --- a/projects/rocprofiler-systems/examples/rewrite-caller/rewrite-caller.cpp +++ b/projects/rocprofiler-systems/examples/rewrite-caller/rewrite-caller.cpp @@ -1,3 +1,6 @@ +// Copyright (c) Advanced Micro Devices, Inc. +// SPDX-License-Identifier: MIT + #include #include #include diff --git a/projects/rocprofiler-systems/examples/trace-time-window/trace-time-window.cpp b/projects/rocprofiler-systems/examples/trace-time-window/trace-time-window.cpp index 12a7d3f978..3946fe298b 100644 --- a/projects/rocprofiler-systems/examples/trace-time-window/trace-time-window.cpp +++ b/projects/rocprofiler-systems/examples/trace-time-window/trace-time-window.cpp @@ -1,3 +1,6 @@ +// Copyright (c) Advanced Micro Devices, Inc. +// SPDX-License-Identifier: MIT + #include #include #include diff --git a/projects/rocprofiler-systems/examples/user-api/user-api.cpp b/projects/rocprofiler-systems/examples/user-api/user-api.cpp index 54635a0894..190c3c7549 100644 --- a/projects/rocprofiler-systems/examples/user-api/user-api.cpp +++ b/projects/rocprofiler-systems/examples/user-api/user-api.cpp @@ -1,3 +1,5 @@ +// Copyright (c) Advanced Micro Devices, Inc. +// SPDX-License-Identifier: MIT #include #include diff --git a/projects/rocprofiler-systems/scripts/gperftools-cpu-profile.sh b/projects/rocprofiler-systems/scripts/gperftools-cpu-profile.sh index e11b6369d5..6320ea958b 100755 --- a/projects/rocprofiler-systems/scripts/gperftools-cpu-profile.sh +++ b/projects/rocprofiler-systems/scripts/gperftools-cpu-profile.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Copyright (c) Advanced Micro Devices, Inc. +# SPDX-License-Identifier: MIT + EXE=$(basename ${1}) DIR=gperftools-output mkdir -p ${DIR} diff --git a/projects/rocprofiler-systems/scripts/rocprof-sys-launch-compiler b/projects/rocprofiler-systems/scripts/rocprof-sys-launch-compiler index cf04eabf57..0bc2e597fa 100755 --- a/projects/rocprofiler-systems/scripts/rocprof-sys-launch-compiler +++ b/projects/rocprofiler-systems/scripts/rocprof-sys-launch-compiler @@ -1,4 +1,27 @@ #!/bin/bash -e + +# MIT License +# +# Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All rights reserved. +# +# 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: +# +# 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. + # # This script allows CMAKE_CXX_COMPILER to be a standard # C++ compiler and rocprofiler-systems sets RULE_LAUNCH_COMPILE and diff --git a/projects/rocprofiler-systems/tests/rocprof-sys-causal-tests.cmake b/projects/rocprofiler-systems/tests/rocprof-sys-causal-tests.cmake index cbb4e522eb..d7b59b9b8d 100644 --- a/projects/rocprofiler-systems/tests/rocprof-sys-causal-tests.cmake +++ b/projects/rocprofiler-systems/tests/rocprof-sys-causal-tests.cmake @@ -1,24 +1,5 @@ -# MIT License -# -# Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. -# -# 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: -# -# 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. +# Copyright (c) Advanced Micro Devices, Inc. +# SPDX-License-Identifier: MIT # -------------------------------------------------------------------------------------- # # @@ -113,7 +94,7 @@ rocprofiler_systems_add_causal_test( "Starting causal experiment #1(.*)causal/experiments.json(.*)causal/experiments.coz" ) -# set(_causal_e2e_exe_args 80 100 432525 100000000) set(_causal_e2e_exe_args 80 12 432525 +# set(_causal_e2e_exe_args 80 103 432525 100000000) set(_causal_e2e_exe_args 80 12 432525 # 500000000) set(_causal_e2e_exe_args 80 50 432525 100000000) set(_causal_common_args @@ -148,8 +129,8 @@ causal_e2e_args_and_validation(_causal_slow_func slow-func "-F" "cpu_slow_func" 5 ) causal_e2e_args_and_validation(_causal_fast_func fast-func "-F" "cpu_fast_func" 0 0 0 5) -causal_e2e_args_and_validation(_causal_line_100 line-100 "-S" "causal.cpp:100" 10 20 20 5) -causal_e2e_args_and_validation(_causal_line_110 line-110 "-S" "causal.cpp:110" 0 0 0 5) +causal_e2e_args_and_validation(_causal_line_103 line-103 "-S" "causal.cpp:103" 10 20 20 5) +causal_e2e_args_and_validation(_causal_line_113 line-113 "-S" "causal.cpp:113" 0 0 0 5) if(ROCPROFSYS_BUILD_NUMBER GREATER 1) set(_causal_e2e_environment) @@ -189,13 +170,13 @@ rocprofiler_systems_add_causal_test( rocprofiler_systems_add_causal_test( SKIP_BASELINE - NAME cpu-rocprofsys-line-100-e2e + NAME cpu-rocprofsys-line-103-e2e TARGET causal-cpu-rocprofsys LABELS "causal-e2e" RUN_ARGS ${_causal_e2e_exe_args} CAUSAL_MODE "line" - CAUSAL_ARGS ${_causal_line_100_args} - CAUSAL_VALIDATE_ARGS ${_causal_line_100_valid} + CAUSAL_ARGS ${_causal_line_103_args} + CAUSAL_VALIDATE_ARGS ${_causal_line_103_valid} CAUSAL_PASS_REGEX "Starting causal experiment #1(.*)causal/experiments.json(.*)causal/experiments.coz" ENVIRONMENT "${_causal_e2e_environment}" @@ -204,13 +185,13 @@ rocprofiler_systems_add_causal_test( rocprofiler_systems_add_causal_test( SKIP_BASELINE - NAME cpu-rocprofsys-line-110-e2e + NAME cpu-rocprofsys-line-113-e2e TARGET causal-cpu-rocprofsys LABELS "causal-e2e" RUN_ARGS ${_causal_e2e_exe_args} CAUSAL_MODE "line" - CAUSAL_ARGS ${_causal_line_110_args} - CAUSAL_VALIDATE_ARGS ${_causal_line_110_valid} + CAUSAL_ARGS ${_causal_line_113_args} + CAUSAL_VALIDATE_ARGS ${_causal_line_113_valid} CAUSAL_PASS_REGEX "Starting causal experiment #1(.*)causal/experiments.json(.*)causal/experiments.coz" ENVIRONMENT "${_causal_e2e_environment}" diff --git a/projects/rocprofiler-systems/tests/rocprof-sys-python-tests.cmake b/projects/rocprofiler-systems/tests/rocprof-sys-python-tests.cmake index d1e76e6e83..c6d7ed9319 100644 --- a/projects/rocprofiler-systems/tests/rocprof-sys-python-tests.cmake +++ b/projects/rocprofiler-systems/tests/rocprof-sys-python-tests.cmake @@ -1,24 +1,5 @@ -# MIT License -# -# Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved. -# -# 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: -# -# 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. +# Copyright (c) Advanced Micro Devices, Inc. +# SPDX-License-Identifier: MIT # -------------------------------------------------------------------------------------- # # @@ -153,7 +134,7 @@ foreach(_VERSION ${ROCPROFSYS_PYTHON_VERSIONS}) COMMAND ${ROCPROFSYS_CAT_COMMAND} PYTHON_VERSION ${_VERSION} FILE rocprof-sys-tests-output/python-builtin/${_VERSION}/trip_count.txt - PASS_REGEX "\\\[inefficient\\\]\\\[builtin.py:14\\\]" + PASS_REGEX "\\\[inefficient\\\]\\\[builtin.py:17\\\]" DEPENDS python-builtin-${_VERSION} ENVIRONMENT "${_python_environment}" ) @@ -259,18 +240,18 @@ foreach(_VERSION ${ROCPROFSYS_PYTHON_VERSIONS}) ) set(python_builtin_labels - [run][builtin.py:28] - [fib][builtin.py:10] - [fib][builtin.py:10] - [fib][builtin.py:10] - [fib][builtin.py:10] - [fib][builtin.py:10] - [fib][builtin.py:10] - [fib][builtin.py:10] - [fib][builtin.py:10] - [fib][builtin.py:10] - [fib][builtin.py:10] - [inefficient][builtin.py:14] + [run][builtin.py:31] + [fib][builtin.py:13] + [fib][builtin.py:13] + [fib][builtin.py:13] + [fib][builtin.py:13] + [fib][builtin.py:13] + [fib][builtin.py:13] + [fib][builtin.py:13] + [fib][builtin.py:13] + [fib][builtin.py:13] + [fib][builtin.py:13] + [inefficient][builtin.py:17] ) set(python_builtin_count 5