diff --git a/.github/actions/generate_pyccel_config/action.yml b/.github/actions/generate_pyccel_config/action.yml index a6facf59..a3e268b1 100644 --- a/.github/actions/generate_pyccel_config/action.yml +++ b/.github/actions/generate_pyccel_config/action.yml @@ -28,3 +28,10 @@ runs: file=open('pyccel_intel.json','w')) shell: python working-directory: ./benchmarks + - name: Register default pyccel configurations + run: | + source $INTEL_SOURCE_FILE + pyccel config register pyccel_gnu pyccel_gnu.json + pyccel config register pyccel_intel pyccel_intel.json + shell: bash + working-directory: ./benchmarks diff --git a/.github/workflows/daily_check.yml b/.github/workflows/daily_check.yml index 8b6362b4..eade39d3 100644 --- a/.github/workflows/daily_check.yml +++ b/.github/workflows/daily_check.yml @@ -58,7 +58,7 @@ jobs: run: | source $INTEL_SOURCE_FILE cd benchmarks - python run_benchmarks.py --pyperf --verbose --pyccel-config-files pyccel_gnu.json pyccel_intel.json --pythran-config-files pythran_gnu.config pythran_intel.config + python run_benchmarks.py --pyperf --verbose --pyccel-config-families pyccel_gnu pyccel_intel --pythran-config-files pythran_gnu.config pythran_intel.config cd .. FILE=version_specific_results/pypi_performance_3${{ matrix.python-minor-version }}_${{needs.Check_Pyccel_Version.outputs.new_version }}.md echo "### Performance Comparison (as of ${{needs.Check_Pyccel_Version.outputs.new_version }})" > ${FILE} diff --git a/.github/workflows/run_benchmarks.yml b/.github/workflows/run_benchmarks.yml index ee4bd5d8..0c11a87a 100644 --- a/.github/workflows/run_benchmarks.yml +++ b/.github/workflows/run_benchmarks.yml @@ -43,7 +43,7 @@ jobs: run: | source $INTEL_SOURCE_FILE cd benchmarks - python run_benchmarks.py --verbose --pyccel-config-files pyccel_gnu.json pyccel_intel.json --pythran-config-files pythran_gnu.config pythran_intel.config + python run_benchmarks.py --verbose --pyccel-config-families pyccel_gnu pyccel_intel --pythran-config-files pythran_gnu.config pythran_intel.config cd .. FILE=version_specific_results/devel_performance_312.md echo "### Performance Comparison (as of $(date))" > ${FILE} diff --git a/benchmarks/run_benchmarks.py b/benchmarks/run_benchmarks.py index ad8bf555..ffc29a01 100644 --- a/benchmarks/run_benchmarks.py +++ b/benchmarks/run_benchmarks.py @@ -33,7 +33,7 @@ parser.add_argument('--pypy', action='store_true', help='Run test cases with pypy') parser.add_argument('--no_numba', action='store_true', help="Don't run numba tests") parser.add_argument('--pythran-config-files', type=str, nargs='*', help='Provide configuration files for pythran', default = []) -parser.add_argument('--pyccel-config-files', type=str, nargs='*', help='Provide configuration files for pyccel', default = []) +parser.add_argument('--pyccel-config-families', type=str, nargs='*', help='Provide (default or registered) configuration families for pyccel', default = []) parser.add_argument('--output', choices=('latex', 'markdown'), \ help='Format of the output table (default=markdown)',default='markdown') parser.add_argument('--verbose', action='store_true', help='Enables verbose mode.') @@ -46,7 +46,7 @@ pyperf = args.pyperf time_compilation = args.compilation time_execution = args.execution -pyccel_configs = [os.path.abspath(f) for f in args.pyccel_config_files] +pyccel_configs = args.pyccel_config_families pythran_configs = [os.path.abspath(f) for f in args.pythran_config_files] @@ -62,11 +62,8 @@ test_cases.append('numba') test_case_names.append('numba') n_configs = 0 -for i,f in enumerate(pyccel_configs): - name = os.path.splitext(os.path.basename(f))[0] - with open(f) as config: - languages = json.load(config).keys() - for l in languages: +for i,name in enumerate(pyccel_configs): + for l in ('c', 'fortran'): test_cases.append(f'pyccel_{i}_{l}') test_case_names.append(f'{name}_{l}') n_configs += 1 @@ -235,13 +232,13 @@ def run_process(cmd: "List[str]", time_compilation: "bool"=False, env = None): if tag == 'pyccel': idx_str, language = idx_str.split('_') idx = int(idx_str) - my_file = pyccel_configs[idx] - cmd = ['pyccel', 'compile', f'--compiler-config={my_file}', f'--language={language}', '--verbose', basename] + config = pyccel_configs[idx] + cmd = ['pyccel', 'compile', f'--compiler-family={config}', f'--language={language}', '--verbose', basename] elif tag == 'pythran': idx = int(idx_str) - my_file = pythran_configs[idx] + config = pythran_configs[idx] cmd = ['pythran', '-v', basename] - env['PYTHRANRC'] = my_file + env['PYTHRANRC'] = config if verbose: print(cmd, file=log_file, flush=True)