spack/var/spack/repos/builtin/packages/rocfft/package.py
srekolam ad060c7870
Spack recipes for ROCm software components-Phase1 (#17422)
* Spack recipes for ROCm Stage 1 Build components

* fix flake8 errors

* fixes for flake8 errors

* Add a patch for cmake 3.x suport

* Fix rpath issue where hsa-rocr-dev does not allow it to be filled in by spack

* Remove inherited cmake args from comgr

* Make hsakmt-roct compile: no -Werror because with const cast in numa, and actually add the numa dependency

* Remove redundant cmake args which is inherited

* Fix some dependencies

* Fix some python 2.x compatibilities

* Add amd gpu targets to rocfft

* Make comgr a link dep of rocm-dbgapi and remove redundant cmake args

* Remove redundant cmake args

* Remove more redundant cmake args

* Final redundant args

* Use cmake 3.x instead of a fixed version

* Remove random variable

* Use installed rocclr instead of nonexisting directory

* Don't build outside the staging folder

* Deploy some missing cmake target file

* Formatting

* Fix target list

* Properly handle the rocclr dependency

* Formatting

* Fix vermin test

* Make all 3.5.0 package depend exactly on eachother

* Add a few missing link dependencies

* Fix flake8

* Remove some other redundant flags

* Add gcc install prefix for gcc builds of llvm-amdgpu

* review changes for the spack recipes

* Do not hard-code versions

* Fix atmi install

- no more relative rpaths outside of install directory (required patch)
- fix build -> link dependencies
- remove unused build dependency

* Fix flake8 errors

* Remove unused variable and make things python 2.x compatible

* Fix flake8

* Move compiler config from rocfft -> hipcc

* Remove redundant dependency on fftw-api

* Remove redundant import

* Avoid hitting the ROCM_PATH variable altogether with a patch; also just fill in all variables

* Add missing deps z3, zlib and ncurses+termlib to llvm-amdgpu

* Fix perl shebang and add dep

* Fix typo and patch HIP_CLANG_ROOT detection in hip's cmake files

* fixing build failure due z3 and adding zlib for rocgdb

* new changes to add z3,curses dependency for llvm-amdgpu

* fix flake8 error

Co-authored-by: root <root@localhost.localdomain>
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2020-08-12 19:36:35 -05:00

46 lines
1.5 KiB
Python

# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Rocfft(CMakePackage):
"""Radeon Open Compute FFT library"""
homepage = "https://github.com/ROCmSoftwarePlatform/rocFFT/"
url = "https://github.com/ROCmSoftwarePlatform/rocfft/archive/rocm-3.5.0.tar.gz"
maintainers = ['srekolam', 'arjun-raj-kuppala']
version('3.5.0', sha256='629f02cfecb7de5ad2517b6a8aac6ed4de60d3a9c620413c4d9db46081ac2c88')
amdgpu_targets = (
'gfx701', 'gfx801', 'gfx802', 'gfx803',
'gfx900', 'gfx906', 'gfx908', 'gfx1010',
'gfx1011', 'gfx1012'
)
variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type')
variant('amdgpu_target', default='gfx701', multi=True, values=amdgpu_targets)
depends_on('cmake@3:', type='build')
depends_on('rocm-cmake@3.5.0', type='build', when='@3.5.0')
depends_on('rocm-device-libs@3.5.0', type='build', when='@3.5.0')
depends_on('hip@3.5.0', type=('build', 'link'), when='@3.5.0')
depends_on('comgr@3.5.0', type='build', when='@3.5.0')
def setup_build_environment(self, env):
env.set('CXX', self.spec['hip'].hipcc)
def cmake_args(self):
archs = ",".join(self.spec.variants['amdgpu_target'].value)
args = [
'-DCMAKE_CXX_FLAGS=--amdgpu-target={0}'.format(archs),
]
return args