Skip to content
Closed
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
11 changes: 2 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ jobs:
python-version: 3.7
- name: Install deps
run: pip install "conan>=1.31.2"
- name: Install openblas
run: |
set -e
sudo apt-get update
sudo apt-get install -y libopenblas-dev
shell: bash
if: runner.os == 'Linux'
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
if: runner.os == 'Windows'
Expand Down Expand Up @@ -80,11 +73,11 @@ jobs:
python-version: 3.7
- name: Install deps
run: pip install "conan>=1.31.2"
- name: Install openblas and mpi
- name: Install mpi
run: |
set -e
sudo apt-get update
sudo apt-get install -y libopenblas-dev openmpi-bin libopenmpi-dev
sudo apt-get install -y openmpi-bin libopenmpi-dev
shell: bash
- name: Compile Standalone
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BEFORE_ALL_LINUX: "yum install -y https://dl.fedoraproject.org/pub/epel/7/aarch64/Packages/e/epel-release-7-12.noarch.rpm && yum install -y openblas-devel"
CIBW_BEFORE_ALL_LINUX: "yum install -y https://dl.fedoraproject.org/pub/epel/7/aarch64/Packages/e/epel-release-7-12.noarch.rpm"
CIBW_ARCHS_LINUX: aarch64
- uses: actions/upload-artifact@v2
with:
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
python -m pip install cibuildwheel==2.2.2
- name: Build wheels
env:
CIBW_BEFORE_ALL: "yum install -y yum-utils wget && wget -q https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda-repo-rhel6-10-1-local-10.1.243-418.87.00-1.0-1.x86_64.rpm && rpm -i cuda-repo-rhel6-10-1-local-10.1.243-418.87.00-1.0-1.x86_64.rpm && yum clean all && yum -y install cuda-10-1 openblas-devel"
CIBW_BEFORE_ALL: "yum install -y yum-utils wget && wget -q https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda-repo-rhel6-10-1-local-10.1.243-418.87.00-1.0-1.x86_64.rpm && rpm -i cuda-repo-rhel6-10-1-local-10.1.243-418.87.00-1.0-1.x86_64.rpm && yum clean all && yum -y install cuda-10-1"
CIBW_SKIP: "*-manylinux_i686 cp310* pp* cp36* *musllinux*"
CIBW_ENVIRONMENT: QISKIT_AER_PACKAGE_NAME=qiskit-aer-gpu AER_THRUST_BACKEND=CUDA CUDACXX=/usr/local/cuda/bin/nvcc
run: |
Expand Down Expand Up @@ -166,7 +166,7 @@ jobs:
python -m pip install cibuildwheel==2.2.2
- name: Build wheels
env:
CIBW_BEFORE_ALL: "yum install -y yum-utils wget && wget -q https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda-repo-rhel7-10-1-local-10.1.105-418.39-1.0-1.x86_64.rpm && rpm -i cuda-repo-rhel7-10-1-local-10.1.105-418.39-1.0-1.x86_64.rpm && yum clean all && yum -y install cuda-10-1 openblas-devel"
CIBW_BEFORE_ALL: "yum install -y yum-utils wget && wget -q https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda-repo-rhel7-10-1-local-10.1.105-418.39-1.0-1.x86_64.rpm && rpm -i cuda-repo-rhel7-10-1-local-10.1.105-418.39-1.0-1.x86_64.rpm && yum clean all && yum -y install cuda-10-1"
CIBW_BUILD: "cp310-manylinux_x86_64"
CIBW_ENVIRONMENT: QISKIT_AER_PACKAGE_NAME=qiskit-aer-gpu AER_THRUST_BACKEND=CUDA CUDACXX=/usr/local/cuda/bin/nvcc
run: |
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,6 @@ jobs:
${{ runner.os }}-${{ matrix.python-version}}-
- name: Install Deps
run: python -m pip install -U setuptools wheel virtualenv
- name: Install openblas
run: |
set -e
sudo apt-get update
sudo apt-get install -y libopenblas-dev
shell: bash
- name: Build Sdist
run: python setup.py sdist
- name: Install from sdist and test
Expand Down Expand Up @@ -109,12 +103,6 @@ jobs:
${{ runner.os }}-${{ matrix.python-version}}-
- name: Install Deps
run: python -m pip install -U -c constraints.txt -r requirements-dev.txt wheel
- name: Install openblas
run: |
set -e
sudo apt-get update
sudo apt-get install -y libopenblas-dev
shell: bash
- name: Install Aer
run: python -m pip install -U .
- name: Run Tests
Expand Down Expand Up @@ -151,12 +139,6 @@ jobs:
${{ runner.os }}-${{ matrix.python-version}}-
- name: Install Deps
run: python -m pip install -U -c constraints.txt -r requirements-dev.txt wheel
- name: Install openblas
run: |
set -e
sudo apt-get update
sudo apt-get install -y libopenblas-dev
shell: bash
- name: Install Aer
run: |
set -e
Expand Down
40 changes: 3 additions & 37 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ endif()
include(CTest)
include(compiler_utils)
include(Linter)
include(findBLASInSpecificPath)
include(dependency_utils)

# Get version information
Expand Down Expand Up @@ -191,40 +190,6 @@ if(STATIC_LINKING)
set(BLA_STATIC TRUE)
endif()

if(AER_BLAS_LIB_PATH)
find_BLAS_in_specific_path(${AER_BLAS_LIB_PATH})
else()
if(APPLE)
message(STATUS "Looking for Apple BLAS & Lapack library...")
set(BLA_VENDOR "Apple")
else()
message(STATUS "Looking for OpenBLAS library...")
set(BLA_VENDOR "OpenBLAS")
endif()
if(WIN32)
message(STATUS "Uncompressing OpenBLAS static library...")
set(WIN_ARCH "win64" )
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "4") # Checking if win32 build
set(WIN_ARCH "win32")
endif()
execute_process(COMMAND ${CMAKE_COMMAND} -E tar "xvfj" "${AER_SIMULATOR_CPP_SRC_DIR}/third-party/${WIN_ARCH}/lib/openblas.7z" WORKING_DIRECTORY "${AER_SIMULATOR_CPP_SRC_DIR}/third-party/${WIN_ARCH}/lib/")
set(BACKEND_REDIST_DEPS ${BACKEND_REDIST_DEPS} "${AER_SIMULATOR_CPP_SRC_DIR}/third-party/${WIN_ARCH}/lib/libopenblas.dll")
set(BLAS_LIBRARIES "${AER_SIMULATOR_CPP_SRC_DIR}/third-party/${WIN_ARCH}/lib/libopenblas.dll.a") # Seems CMake is unable to find it on its own
set(BLAS_FOUND True)
else()
find_package(BLAS QUIET)
endif()
if(NOT BLAS_FOUND)
message(STATUS "OpenBLAS not found. Looking for any other BLAS & Lapack libraries...")
unset(BLA_VENDOR)
find_package(BLAS REQUIRED)
find_package(LAPACK REQUIRED)
set(BLAS_LIBRARIES "${BLAS_LIBRARIES};${LAPACK_LIBRARIES}")
endif()
endif()

message(STATUS "BLAS library found: ${BLAS_LIBRARIES}")

if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64")
if(APPLE OR UNIX)
if (NOT CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
Expand Down Expand Up @@ -316,9 +281,10 @@ endif()
# Set dependent libraries
set(AER_LIBRARIES
${AER_LIBRARIES}
${BLAS_LIBRARIES}
AER_DEPENDENCY_PKG::nlohmann_json
AER_DEPENDENCY_PKG::spdlog
AER_DEPENDENCY_PKG::openblas
${CONAN_PKG_LIBS_OPENBLAS}
Threads::Threads
${CMAKE_DL_LIBS}
${THRUST_DEPENDANT_LIBS}
Expand All @@ -337,7 +303,7 @@ else() # Standalone build
# machine running the code has SIMD support
set(SIMD_SOURCE_FILE "${PROJECT_SOURCE_DIR}/src/simulators/statevector/qv_avx2.cpp")
endif()
endif()
endif()

set(AER_SIMULATOR_SOURCES "${PROJECT_SOURCE_DIR}/contrib/standalone/qasm_simulator.cpp")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
Expand Down
Loading