[gem5-dev] [S] Change in gem5/gem5[stable]: misc: Adjust compiler tests and CI tests
Bobby Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/71725?usp=email ) Change subject: misc: Adjust compiler tests and CI tests .. misc: Adjust compiler tests and CI tests This adds a job level timeout for the compiler tests, allows them to run weekly instead of daily, adds a workflow dispatch option, and changes the 'latests-compilers-all-gem5-builds' jobs to run only the .opt variant. It also adds a ready for review option to the CI tests to run when someone converts a draft pull request. Change-Id: Id32b5f7da90745d18de2e550bd48d32ba45fb4d9 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71725 Reviewed-by: Jason Lowe-Power Maintainer: Bobby Bruce Tested-by: kokoro --- M .github/workflows/ci-tests.yaml M .github/workflows/compiler-tests.yaml 2 files changed, 8 insertions(+), 4 deletions(-) Approvals: Jason Lowe-Power: Looks good to me, approved Bobby Bruce: Looks good to me, approved kokoro: Regressions pass diff --git a/.github/workflows/ci-tests.yaml b/.github/workflows/ci-tests.yaml index b1c5a1a..61ba4b5 100644 --- a/.github/workflows/ci-tests.yaml +++ b/.github/workflows/ci-tests.yaml @@ -4,7 +4,7 @@ on: pull_request: -types: [opened, edited, synchronize] +types: [opened, edited, synchronize, ready_for_review] jobs: diff --git a/.github/workflows/compiler-tests.yaml b/.github/workflows/compiler-tests.yaml index 013a710..52569e2 100644 --- a/.github/workflows/compiler-tests.yaml +++ b/.github/workflows/compiler-tests.yaml @@ -5,9 +5,11 @@ on: - # Runs every day from 7AM UTC + # Runs every Friday from 7AM UTC schedule: -- cron: '0 7 * * *' +- cron: '00 7 * * 5' + # Allows us to manually start workflow for testing + workflow_dispatch: jobs: # replication of compiler-tests.sh @@ -17,6 +19,7 @@ image: [gcc-version-12, gcc-version-11, gcc-version-10, gcc-version-9, gcc-version-8, gcc-version-7, clang-version-14, clang-version-13, clang-version-12, clang-version-11, clang-version-10, clang-version-9, clang-version-8, clang-version-7, clang-version-6.0, ubuntu-18.04_all-dependencies, ubuntu-20.04_all-dependencies, ubuntu-22.04_all-dependencies, ubuntu-22.04_min-dependencies] opts: [.opt, .fast] runs-on: [self-hosted, linux, x64, run] +timeout-minutes: 2880 # 48 hours container: gcr.io/gem5-test/${{ matrix.image }}:latest steps: - uses: actions/checkout@v3 @@ -34,8 +37,9 @@ matrix: gem5-compilation: [ARM, ARM_MESI_Three_Level, ARM_MESI_Three_Level_HTM, ARM_MOESI_hammer, Garnet_standalone, GCN3_X86, MIPS, 'NULL', NULL_MESI_Two_Level, NULL_MOESI_CMP_directory, NULL_MOESI_CMP_token, NULL_MOESI_hammer, POWER, RISCV, SPARC, X86, X86_MI_example, X86_MOESI_AMD_Base] image: [gcc-version-12, clang-version-14] -opts: [.opt, .fast] +opts: [.opt] runs-on: [self-hosted, linux, x64, run] +timeout-minutes: 2880 # 48 hours container: gcr.io/gem5-test/${{ matrix.image }}:latest steps: - uses: actions/checkout@v3 -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71725?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: public/gem5 Gerrit-Branch: stable Gerrit-Change-Id: Id32b5f7da90745d18de2e550bd48d32ba45fb4d9 Gerrit-Change-Number: 71725 Gerrit-PatchSet: 3 Gerrit-Owner: Melissa Jost Gerrit-Reviewer: Bobby Bruce Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: kokoro Gerrit-CC: kokoro ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [S] Change in gem5/gem5[develop]: base: define is_std_hash_enabled type trait
Gabriel B. has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/71839?usp=email ) Change subject: base: define is_std_hash_enabled type trait .. base: define is_std_hash_enabled type trait Change-Id: I7ffb7f80a90006d6b8cd42bdf3d63e34c6dbda01 --- M src/base/type_traits.hh 1 file changed, 11 insertions(+), 0 deletions(-) diff --git a/src/base/type_traits.hh b/src/base/type_traits.hh index a42f786..c40696c 100644 --- a/src/base/type_traits.hh +++ b/src/base/type_traits.hh @@ -105,6 +105,17 @@ template constexpr bool is_iterable_v = is_iterable::value; +// std::hash-enabled type trait +template +struct is_std_hash_enabled: std::false_type {}; + +template +struct is_std_hash_enabled())>>>: std::true_type {}; + +template +constexpr bool is_std_hash_enabled_v = is_std_hash_enabled::value; + } // namespace gem5 #endif // BASE_TYPETRAITS_HH -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71839?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I7ffb7f80a90006d6b8cd42bdf3d63e34c6dbda01 Gerrit-Change-Number: 71839 Gerrit-PatchSet: 1 Gerrit-Owner: Gabriel B. ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [S] Change in gem5/gem5[develop]: base: define is_iterable type trait
Gabriel B. has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/71838?usp=email ) Change subject: base: define is_iterable type trait .. base: define is_iterable type trait Change-Id: I38bb0ddcbb95645797f1d20724b78aff3bef4580 --- M src/base/type_traits.hh 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/base/type_traits.hh b/src/base/type_traits.hh index 1fec93d..a42f786 100644 --- a/src/base/type_traits.hh +++ b/src/base/type_traits.hh @@ -27,8 +27,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __BASE_TYPETRAITS_HH__ -#define __BASE_TYPETRAITS_HH__ +#ifndef BASE_TYPETRAITS_HH +#define BASE_TYPETRAITS_HH #include #include @@ -92,6 +92,19 @@ using MemberFunctionArgsTuple_t = typename MemberFunctionSignature::argsTuple_t; + +// iterable type trait +template +struct is_iterable: std::false_type {}; + +template +struct is_iterable())), +decltype(end(std::declval()))>>: std::true_type {}; + +template +constexpr bool is_iterable_v = is_iterable::value; + } // namespace gem5 -#endif // __BASE_TYPETRAITS_HH__ +#endif // BASE_TYPETRAITS_HH -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71838?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I38bb0ddcbb95645797f1d20724b78aff3bef4580 Gerrit-Change-Number: 71838 Gerrit-PatchSet: 1 Gerrit-Owner: Gabriel B. ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [S] Change in gem5/gem5[develop]: base: Add Printer util class to force use of operator<< helpers
Gabriel B. has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/71840?usp=email ) Change subject: base: Add Printer util class to force use of operator<< helpers .. base: Add Printer util class to force use of operator<< helpers Wrapping any value in a Printer instance before using operator<< will force the use of stl_helpers::operator<<. Change-Id: I7b505194eeabc3e0721effd9b5ce98f9e151b807 --- M src/base/stl_helpers/ostream_helpers.hh 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/base/stl_helpers/ostream_helpers.hh b/src/base/stl_helpers/ostream_helpers.hh index cee5fc0..d562a4d 100644 --- a/src/base/stl_helpers/ostream_helpers.hh +++ b/src/base/stl_helpers/ostream_helpers.hh @@ -41,6 +41,19 @@ namespace gem5::stl_helpers { +/* + * Wrap any object in a Printer object to force using a opExtract_impl printing + * function. This is not required for types that do not already enable + * operator<< in another namespace. However, to enable the special printing + * function for, e.g., raw pointers, those must be wrapped in a Printer. + */ +template +struct Printer +{ +Printer(const T& value): value{value} {} +const T& value; +}; + namespace opExtract_impl { @@ -128,6 +141,13 @@ return opExtractPrimDisp(os, p.get()); } +template +std::ostream& +opExtractPrimDisp(std::ostream& os, const Printer& p) +{ +return opExtractSecDisp(os, p.value); +} + template constexpr bool isOpExtractNativelySupported = false; @@ -179,7 +199,8 @@ } // namespace opExtract_impl -// Add "using stl_helpers::operator<<" in the scope where you want to use it. +// use the Printer wrapper or add "using stl_helpers::operator<<" in the scope +// where you want to use that operator<<. template std::enable_if_t, std::ostream&> operator<<(std::ostream& os, const T& v) -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71840?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I7b505194eeabc3e0721effd9b5ce98f9e151b807 Gerrit-Change-Number: 71840 Gerrit-PatchSet: 1 Gerrit-Owner: Gabriel B. ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [S] Change in gem5/gem5[develop]: resources: Catch ConnectionResourceError in downloading resources
Melissa Jost has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/71858?usp=email ) Change subject: resources: Catch ConnectionResourceError in downloading resources .. resources: Catch ConnectionResourceError in downloading resources This handles an error we see within GitHub Actions that occassionally occurs when downloading resources. We retry in the same way we do when handling HTTPErrors. Change-Id: I4dce5d607ccc41ad53b51e39082c486e644d815c --- M src/python/gem5/resources/downloader.py 1 file changed, 16 insertions(+), 0 deletions(-) diff --git a/src/python/gem5/resources/downloader.py b/src/python/gem5/resources/downloader.py index bb5ca84..d606f34 100644 --- a/src/python/gem5/resources/downloader.py +++ b/src/python/gem5/resources/downloader.py @@ -139,6 +139,22 @@ time.sleep((2**attempt) + random.uniform(0, 1)) else: raise e +except ConnectionResetError as e: +# This catches the ConnectionResetError we see occassionally see +# when accessing resources on GitHub Actions. It retries using a +# Truncated Exponential backoff algorithm, truncating after +# "max_attempts". If any other is retrieved we raise the error. +if e.errno == 104: +attempt += 1 +if attempt >= max_attempts: +raise Exception( +f"After {attempt} attempts, the resource json could " +"not be retrieved. OS Error Code retrieved: " +f"{e.errno}" +) +time.sleep((2**attempt) + random.uniform(0, 1)) +else: +raise e except ValueError as e: raise Exception( "Environment variable GEM5_USE_PROXY is set to " -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71858?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I4dce5d607ccc41ad53b51e39082c486e644d815c Gerrit-Change-Number: 71858 Gerrit-PatchSet: 1 Gerrit-Owner: Melissa Jost ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org
[gem5-dev] [XS] Change in gem5/gem5[develop]: resources: Output error message in downloader.py
Melissa Jost has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/71859?usp=email ) Change subject: resources: Output error message in downloader.py .. resources: Output error message in downloader.py This allows for the actual error message to be output in addition to the output gem5 has on ValueErrors and ImportErrors. Change-Id: Ic52f5646aa41dbf7c217ab27d142c0a18fa24c55 --- M src/python/gem5/resources/downloader.py 1 file changed, 2 insertions(+), 0 deletions(-) diff --git a/src/python/gem5/resources/downloader.py b/src/python/gem5/resources/downloader.py index d606f34..1aeb487 100644 --- a/src/python/gem5/resources/downloader.py +++ b/src/python/gem5/resources/downloader.py @@ -157,12 +157,14 @@ raise e except ValueError as e: raise Exception( +f"ValueError: {e}\n" "Environment variable GEM5_USE_PROXY is set to " f"'{use_proxy}'. The expected form is " ":'." ) except ImportError as e: raise Exception( +f"ImportError: {e}\n" "An import error has occurred. This is likely due " "the Python SOCKS client module not being " "installed. It can be installed with " -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71859?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: Ic52f5646aa41dbf7c217ab27d142c0a18fa24c55 Gerrit-Change-Number: 71859 Gerrit-PatchSet: 1 Gerrit-Owner: Melissa Jost ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org