diff --git a/rocclr/CMakeLists.txt b/rocclr/CMakeLists.txt index 886d860bb7..9247ce1448 100644 --- a/rocclr/CMakeLists.txt +++ b/rocclr/CMakeLists.txt @@ -1,3 +1,23 @@ +# Copyright (C) 2017-2021 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. + cmake_minimum_required(VERSION 3.5) project(ROCclr VERSION "1.0.0" LANGUAGES C CXX) diff --git a/rocclr/LICENSE.txt b/rocclr/LICENSE.txt index e44ba39fd0..9a1f87d2c3 100644 --- a/rocclr/LICENSE.txt +++ b/rocclr/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2008-2020 Advanced Micro Devices, Inc. +Copyright (c) 2008-2021 Advanced Micro Devices, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/rocclr/cmake/ROCclrConfig.cmake.in b/rocclr/cmake/ROCclrConfig.cmake.in index d52fcf771c..17ef4427b6 100644 --- a/rocclr/cmake/ROCclrConfig.cmake.in +++ b/rocclr/cmake/ROCclrConfig.cmake.in @@ -1,3 +1,23 @@ +# Copyright (C) 2017-2021 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. + @ROCCLR_PREFIX_CODE@ include( CMakeFindDependencyMacro ) diff --git a/rocclr/cmake/modules/FindROCR.cmake b/rocclr/cmake/modules/FindROCR.cmake index 2b198dcf8f..13862f3c1b 100644 --- a/rocclr/cmake/modules/FindROCR.cmake +++ b/rocclr/cmake/modules/FindROCR.cmake @@ -1,3 +1,23 @@ +# Copyright (C) 2017-2021 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. + # Try to find ROCR (Radeon Open Compute Runtime) # # Once found, this will define: diff --git a/rocclr/cmake/modules/FindROCT.cmake b/rocclr/cmake/modules/FindROCT.cmake index 37f08fcff7..6ad3f59e16 100644 --- a/rocclr/cmake/modules/FindROCT.cmake +++ b/rocclr/cmake/modules/FindROCT.cmake @@ -1,3 +1,23 @@ +# Copyright (C) 2019-2021 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. + # Try to find ROCT (Radeon Open Compute Thunk) # # Once found, this will define: diff --git a/rocclr/cmake/modules/bc2h.cmake b/rocclr/cmake/modules/bc2h.cmake index 4b88abe87a..4a76645390 100644 --- a/rocclr/cmake/modules/bc2h.cmake +++ b/rocclr/cmake/modules/bc2h.cmake @@ -1,3 +1,23 @@ +# Copyright (C) 2017-2021 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. + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/bc2h.c "#include \n" "int main(int argc, char **argv){\n" diff --git a/rocclr/device/pal/CMakeLists.txt b/rocclr/device/pal/CMakeLists.txt index 0e2304ed24..5f7c355d9d 100644 --- a/rocclr/device/pal/CMakeLists.txt +++ b/rocclr/device/pal/CMakeLists.txt @@ -1,3 +1,23 @@ +# Copyright (C) 2020-2021 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. + ### file(STRINGS palcdefs PAL_MAJOR_VERSION REGEX "^PAL_MAJOR_VERSION = [0-9]+") string(REGEX REPLACE "PAL_MAJOR_VERSION = " "" PAL_MAJOR_VERSION ${PAL_MAJOR_VERSION}) diff --git a/rocclr/device/rocm/CMakeLists.txt b/rocclr/device/rocm/CMakeLists.txt index dbba2279be..72cbcc1fd1 100644 --- a/rocclr/device/rocm/CMakeLists.txt +++ b/rocclr/device/rocm/CMakeLists.txt @@ -1,3 +1,23 @@ +# Copyright (C) 2017-2021 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. + add_library(oclrocm OBJECT roccounters.cpp rocprintf.cpp diff --git a/rocclr/elf/elfio/elf_types.hpp b/rocclr/elf/elfio/elf_types.hpp index 61d6eba971..966b3a1161 100644 --- a/rocclr/elf/elfio/elf_types.hpp +++ b/rocclr/elf/elfio/elf_types.hpp @@ -1,5 +1,6 @@ /* Copyright (C) 2001-2015 by Serge Lamikhov-Center +Modifications Copyright (C) 2020-2021 Advanced Micro Devices, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/rocclr/elf/elfio/elfio.hpp b/rocclr/elf/elfio/elfio.hpp index c0ad536284..3ed1fb0e86 100644 --- a/rocclr/elf/elfio/elfio.hpp +++ b/rocclr/elf/elfio/elfio.hpp @@ -1,5 +1,6 @@ /* Copyright (C) 2001-2015 by Serge Lamikhov-Center +Modifications Copyright (C) 2020-2021 Advanced Micro Devices, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/rocclr/elf/elfio/elfio_dump.hpp b/rocclr/elf/elfio/elfio_dump.hpp index 1535eb6e44..c70bf538b6 100644 --- a/rocclr/elf/elfio/elfio_dump.hpp +++ b/rocclr/elf/elfio/elfio_dump.hpp @@ -1,5 +1,6 @@ /* Copyright (C) 2001-2015 by Serge Lamikhov-Center +Modifications Copyright (C) 2020-2021 Advanced Micro Devices, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/rocclr/elf/elfio/elfio_dynamic.hpp b/rocclr/elf/elfio/elfio_dynamic.hpp index 16a1a9e626..87cf62d55b 100644 --- a/rocclr/elf/elfio/elfio_dynamic.hpp +++ b/rocclr/elf/elfio/elfio_dynamic.hpp @@ -1,5 +1,6 @@ /* Copyright (C) 2001-2015 by Serge Lamikhov-Center +Modifications Copyright (C) 2020-2021 Advanced Micro Devices, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/rocclr/elf/elfio/elfio_header.hpp b/rocclr/elf/elfio/elfio_header.hpp index cb76cef222..f061fecc80 100644 --- a/rocclr/elf/elfio/elfio_header.hpp +++ b/rocclr/elf/elfio/elfio_header.hpp @@ -1,5 +1,6 @@ /* Copyright (C) 2001-2015 by Serge Lamikhov-Center +Modifications Copyright (C) 2020-2021 Advanced Micro Devices, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/rocclr/elf/elfio/elfio_note.hpp b/rocclr/elf/elfio/elfio_note.hpp index fa3f9e6598..d054906f1a 100644 --- a/rocclr/elf/elfio/elfio_note.hpp +++ b/rocclr/elf/elfio/elfio_note.hpp @@ -1,5 +1,6 @@ /* Copyright (C) 2001-2015 by Serge Lamikhov-Center +Modifications Copyright (C) 2020-2021 Advanced Micro Devices, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/rocclr/elf/elfio/elfio_relocation.hpp b/rocclr/elf/elfio/elfio_relocation.hpp index 2b6bd71bc8..b6aa16016d 100644 --- a/rocclr/elf/elfio/elfio_relocation.hpp +++ b/rocclr/elf/elfio/elfio_relocation.hpp @@ -1,5 +1,6 @@ /* Copyright (C) 2001-2015 by Serge Lamikhov-Center +Modifications Copyright (C) 2020-2021 Advanced Micro Devices, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/rocclr/elf/elfio/elfio_section.hpp b/rocclr/elf/elfio/elfio_section.hpp index a5df9d275b..22e0f57916 100644 --- a/rocclr/elf/elfio/elfio_section.hpp +++ b/rocclr/elf/elfio/elfio_section.hpp @@ -1,5 +1,6 @@ /* Copyright (C) 2001-2015 by Serge Lamikhov-Center +Modifications Copyright (C) 2020-2021 Advanced Micro Devices, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/rocclr/elf/elfio/elfio_segment.hpp b/rocclr/elf/elfio/elfio_segment.hpp index 6357b94b7b..3de7e22789 100644 --- a/rocclr/elf/elfio/elfio_segment.hpp +++ b/rocclr/elf/elfio/elfio_segment.hpp @@ -1,5 +1,6 @@ /* Copyright (C) 2001-2015 by Serge Lamikhov-Center +Modifications Copyright (C) 2020-2021 Advanced Micro Devices, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/rocclr/elf/elfio/elfio_strings.hpp b/rocclr/elf/elfio/elfio_strings.hpp index ca2dc7967a..cda5bd7c47 100644 --- a/rocclr/elf/elfio/elfio_strings.hpp +++ b/rocclr/elf/elfio/elfio_strings.hpp @@ -1,5 +1,6 @@ /* Copyright (C) 2001-2015 by Serge Lamikhov-Center +Modifications Copyright (C) 2020-2021 Advanced Micro Devices, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/rocclr/elf/elfio/elfio_symbols.hpp b/rocclr/elf/elfio/elfio_symbols.hpp index 9f9a021afa..65482d30b8 100644 --- a/rocclr/elf/elfio/elfio_symbols.hpp +++ b/rocclr/elf/elfio/elfio_symbols.hpp @@ -1,5 +1,6 @@ /* Copyright (C) 2001-2015 by Serge Lamikhov-Center +Modifications Copyright (C) 2020-2021 Advanced Micro Devices, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/rocclr/elf/elfio/elfio_utils.hpp b/rocclr/elf/elfio/elfio_utils.hpp index 6dacf1ad12..6dd980c3ca 100644 --- a/rocclr/elf/elfio/elfio_utils.hpp +++ b/rocclr/elf/elfio/elfio_utils.hpp @@ -1,5 +1,6 @@ /* Copyright (C) 2001-2015 by Serge Lamikhov-Center +Modifications Copyright (C) 2020-2021 Advanced Micro Devices, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/rocclr/elf/test/CMakeLists.txt b/rocclr/elf/test/CMakeLists.txt index 2fede50563..8ed8d020bd 100644 --- a/rocclr/elf/test/CMakeLists.txt +++ b/rocclr/elf/test/CMakeLists.txt @@ -1,3 +1,23 @@ +# Copyright (C) 2020-2021 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. + #-------------------------------------elf_test--------------------------------------# cmake_minimum_required(VERSION 3.5.1) # This is unit test for amd::Elf. diff --git a/rocclr/elf/test/main.cpp b/rocclr/elf/test/main.cpp index efb8c1973d..fed06c6a5c 100644 --- a/rocclr/elf/test/main.cpp +++ b/rocclr/elf/test/main.cpp @@ -1,3 +1,23 @@ +/* Copyright (c) 2020-2021 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. */ + #include #include #include