packages:
  all:
    require:
      - "~rocm"

      - spec: cuda_arch={cuda_arch}
        when: '+cuda'

      - spec: '+cuda'
        when: '%gcc'

  # ---------------------------------------------------------------------------
  cuda:
    prefer:
    - spec: "^gcc-runtime@{gcc_version}"
      when: "%gcc"
    - spec: "%gcc@{gcc_version} target={target}"
      when: "%gcc"
    require:
    - '@12.4.1'

  hypre:
    require:
    - spec: '+cuda cuda_arch={cuda_arch} +unified-memory'
      when: '%gcc'

  kokkos:
    require:
    - spec: '+cuda +cuda_lambda cuda_arch={cuda_arch} +wrapper ~openmptarget'
      when: '%gcc'

  kokkos-kernels:
    require: ['+cuda', '+cublas', '+cusolver', '+cusparse', 'cuda_arch={cuda_arch}']

  libxc:
    require: ['+cuda', 'cuda_arch={cuda_arch}']

  nvshmem:
    require:
    - spec: '+cuda cuda_arch={cuda_arch} +ibgda +nccl +ucx +mpi'

  openmpi:
    require: ['+cuda', 'cuda_arch={cuda_arch}']

  papi:
    require: ['+nvml', '+infiniband', '+cuda']

  paraview:
    require: ['~cuda']

  petsc:
    require:
    - spec: '+cuda cuda_arch={cuda_arch}'
      when: '%gcc'

  py-tensorflow:
    require:
    - spec: '+cuda cuda_arch={cuda_arch} +nccl'

  py-torch:
    require:
    - spec: '+cuda cuda_arch={cuda_arch} +nccl +cudnn'

  python:
    require:
    - spec: 'target={target}'
      when: '%gcc@{gcc_version}'

  suite-sparse:
    require:
    - spec: '+cuda'
      when: '@7.3.1'
    - spec: '~cuda'
      when: '@7.2.1'

  ucc:
    require:
    - spec: '+cuda cuda_arch={cuda_arch} +nccl'

  ucx:
    require:
    - spec: '+xpmem +cma +rdmacm +rc +ud +dc +verbs +ib_hw_tm +gdrcopy +cuda cuda_arch={cuda_arch} ~rocm'
