Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/actions/generate_pyccel_config/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/daily_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
19 changes: 8 additions & 11 deletions benchmarks/run_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
Expand All @@ -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]


Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down