Skip to content

Commit

Permalink
fix github workflow for amd cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
hczhai committed Nov 3, 2023
1 parent b86276b commit e770aca
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,21 @@ jobs:
sudo make
sudo cp lib/*.a /usr/lib
- name: fix mkl for amd cpu
if: matrix.os == 'ubuntu-20.04'
env:
CC: gcc-9
CXX: g++-9
run: |
lscpu
export CPUTYPE=$(lscpu | grep 'Vendor ID' | awk '{print $3}')
echo $CPUTYPE
if [ "$CPUTYPE" = "AuthenticAMD" ]; then
echo "int mkl_serv_intel_cpu_true() { return 1; }" > fixcpu.c
$CC -shared -fPIC -o libfixcpu.so fixcpu.c
export LD_PRELOAD=$PWD/libfixcpu.so
fi
- name: build gtest (macos)
if: matrix.os == 'macos-12'
run: |
Expand Down

0 comments on commit e770aca

Please sign in to comment.