Skip to content

Commit

Permalink
Merge branch 'main' into release_3_12
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilyBourne authored Nov 8, 2023
2 parents 573bfd3 + fc22148 commit 87a157d
Show file tree
Hide file tree
Showing 30 changed files with 8,326 additions and 4,360 deletions.
26 changes: 20 additions & 6 deletions .github/actions/generate_pyccel_config/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,34 @@ runs:
steps:
- name: Generate default pyccel configurations
run: |
pyccel --language=fortran --export-compile-info pyccel_fortran.json
pyccel --language=c --export-compile-info pyccel_c.json
pyccel --language=fortran --export-compile-info pyccel_fortran_gnu.json
pyccel --language=c --export-compile-info pyccel_c_gnu.json
pyccel --compiler=intel --language=fortran --export-compile-info pyccel_fortran_intel.json
pyccel --compiler=intel --language=c --export-compile-info pyccel_c_intel.json
shell: bash
working-directory: ./benchmarks
- name: Add improved flags
run: |
import json
config = json.load(open('pyccel_fortran.json'))
# Fortran GNU
config = json.load(open('pyccel_fortran_gnu.json'))
config['general_flags'].extend(['-O3', '-march=native', '-mtune=native', '-mavx', '-ffast-math'])
print(json.dumps(config, indent=4),
file=open('pyccel_fortran.json','w'))
config = json.load(open('pyccel_c.json'))
file=open('pyccel_fortran_gnu.json','w'))
# C GNU
config = json.load(open('pyccel_c_gnu.json'))
config['general_flags'].extend(['-O3', '-march=native', '-mtune=native', '-mavx', '-ffast-math'])
print(json.dumps(config, indent=4),
file=open('pyccel_c.json','w'))
file=open('pyccel_c_gnu.json','w'))
# Fortran Intel
config = json.load(open('pyccel_fortran_intel.json'))
config['general_flags'].extend(['-O3', '-xHost', '-mavx', '-fast', '-unroll', '-vec', '-simd'])
print(json.dumps(config, indent=4),
# C Intel
file=open('pyccel_fortran_intel.json','w'))
config = json.load(open('pyccel_c_intel.json'))
config['general_flags'].extend(['-O3', '-xHost', '-mavx', '-fast', '-unroll', '-vec', '-simd'])
print(json.dumps(config, indent=4),
file=open('pyccel_c_intel.json','w'))
shell: python
working-directory: ./benchmarks
23 changes: 23 additions & 0 deletions .github/actions/linux_install/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
name: 'Linux installation commands'

env:
LINUX_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/0722521a-34b5-4c41-af3f-d5d14e88248d/l_HPCKit_p_2023.2.0.49440_offline.sh
LINUX_FORTRAN_COMPONENTS: intel-oneapi-compiler-fortran
LINUX_FORTRAN_COMPONENTS_WEB: intel.oneapi.lin.ifort-compiler
CACHE_NUMBER: 8
SAMPLES_TAG: 2023.2.0
COMPILER_VERSION: 2023.2.0
TBB_VERSION: 2021.10.0
VS_VER: vs2022

runs:
using: "composite"
steps:
Expand Down Expand Up @@ -28,3 +38,16 @@ runs:
run:
sudo apt-get install msttcorefonts -qq
shell: bash
- name: Install Intel OneAPI
run: |
# See https://github.com/oneapi-src/oneapi-ci
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/oneAPI.list" -o APT::Get::List-Cleanup="0"
sudo apt-get install -y intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic intel-oneapi-openmp intel-oneapi-mkl
LATEST_VERSION=$(ls -1 /opt/intel/oneapi/compiler/ | grep -v latest | sort | tail -1)
# shellcheck source=/dev/null
echo "INTEL_SOURCE_FILE=/opt/intel/oneapi/compiler/$LATEST_VERSION/env/vars.sh"
echo "INTEL_SOURCE_FILE=/opt/intel/oneapi/compiler/$LATEST_VERSION/env/vars.sh" >> $GITHUB_ENV
shell: bash
3 changes: 2 additions & 1 deletion .github/workflows/daily_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ jobs:
uses: ./.github/actions/generate_pyccel_config
- name: Benchmark
run: |
source $INTEL_SOURCE_FILE
cd benchmarks
python run_benchmarks.py --pyperf --verbose --pyccel-config-files pyccel_fortran.json pyccel_c.json --pythran-config-files pythran.config
python run_benchmarks.py --pyperf --verbose --pyccel-config-files pyccel_fortran_gnu.json pyccel_c_gnu.json pyccel_fortran_intel.json pyccel_c_intel.json --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 @@ -50,7 +50,7 @@ jobs:
- name: Benchmark
run: |
cd benchmarks
python run_benchmarks.py --verbose --pyccel-config-files pyccel_fortran.json pyccel_c.json --pythran-config-files pythran.config
python run_benchmarks.py --verbose --pyccel-config-files pyccel_fortran_gnu.json pyccel_c_gnu.json pyccel_fortran_intel.json pyccel_c_intel.json --pythran-config-files pythran_gnu.config pythran_intel.config
cd ..
FILE=version_specific_results/devel_performance_310.md
echo "### Performance Comparison (as of $(date))" > ${FILE}
Expand Down
Loading

0 comments on commit 87a157d

Please sign in to comment.