Skip to content

Commit f84d34c

Browse files
committed
Merge branch 'release/1.3.0.0' into stable
2 parents 2540ad2 + 208afff commit f84d34c

36 files changed

+753
-632
lines changed

.github/workflows/ci.yml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
name: CI
2+
3+
# Trigger the workflow on push or pull request
4+
on:
5+
pull_request:
6+
push:
7+
# but only for the master branch
8+
# branches: [master]
9+
10+
defaults:
11+
run:
12+
shell: bash
13+
14+
jobs:
15+
stack:
16+
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }} / llvm ${{ matrix.llvm }} / cuda ${{ matrix.cuda }}
17+
runs-on: ${{ matrix.os }}
18+
continue-on-error: ${{ matrix.allow_failure }}
19+
strategy:
20+
matrix:
21+
include:
22+
- os: ubuntu-latest
23+
ghc: "8.10"
24+
llvm: "9"
25+
cuda: "10.2"
26+
allow_failure: false
27+
28+
- os: ubuntu-latest
29+
ghc: "8.8"
30+
llvm: "9"
31+
cuda: "10.2"
32+
allow_failure: false
33+
34+
- os: ubuntu-latest
35+
ghc: "8.6"
36+
llvm: "8"
37+
cuda: "10.1"
38+
allow_failure: false
39+
40+
- os: macOS-latest
41+
ghc: "8.8"
42+
llvm: "9"
43+
cuda: ""
44+
allow_failure: false
45+
46+
# Disabled due to missing libffi
47+
# - os: windows-latest
48+
# ghc: "8.6"
49+
# llvm: "9.0.1"
50+
# cuda: "10.2.89.20191206"
51+
# allow_failure: false
52+
53+
env:
54+
STACK_FLAGS: "--system-ghc --no-install-ghc --fast"
55+
56+
steps:
57+
- uses: actions/checkout@v2
58+
59+
- uses: actions/[email protected]
60+
with:
61+
enable-stack: true
62+
ghc-version: ${{ matrix.ghc }}
63+
64+
- name: Set up stack
65+
id: stack-setup
66+
run: |
67+
ln -s stack-${{ matrix.ghc }}.yaml stack.yaml
68+
echo "::set-output name=stack-root::$(stack path --system-ghc --no-install-ghc --stack-root)"
69+
70+
- uses: actions/cache@v1
71+
with:
72+
path: ${{ steps.stack-setup.outputs.stack-root }}
73+
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.llvm }}-${{ matrix.cuda }}-stack
74+
75+
- name: Setup (Linux)
76+
if: runner.os == 'Linux'
77+
run: |
78+
MATRIX_CUDA=${{ matrix.cuda }}
79+
sudo apt-get -y install llvm-${{ matrix.llvm }}-dev libfftw3-dev
80+
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
81+
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
82+
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
83+
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /"
84+
sudo apt-get update
85+
sudo apt-get -y install cuda-${MATRIX_CUDA/./-}
86+
echo "::set-env name=CUDA_HOME::/usr/local/cuda-${{ matrix.cuda }}"
87+
echo "::set-env name=LD_LIBRARY_PATH::/usr/local/cuda-${{ matrix.cuda }}/lib64:$(stack exec ghc -- --print-libdir)/rts:/usr/local/cuda-${{ matrix.cuda }}/nvvm/lib64:${LD_LIBRARY_PATH}"
88+
echo "::add-path::/usr/local/cuda-${{ matrix.cuda }}/bin"
89+
90+
- name: Setup (macOS)
91+
if: runner.os == 'macOS'
92+
run: |
93+
brew tap llvm-hs/homebrew-llvm
94+
brew install pkg-config
95+
brew install libffi
96+
brew install fftw
97+
brew install llvm-${{ matrix.llvm }}
98+
echo "::set-env name=PKG_CONFIG_PATH::$(brew --prefix)/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH"
99+
echo "::set-env name=STACK_FLAGS::$STACK_FLAGS --flag accelerate-fft:-llvm-ptx"
100+
101+
# - name: Setup (Windows)
102+
# if: runner.os == 'Windows'
103+
# run: |
104+
# choco install llvm --version=${{ matrix.llvm }}
105+
# choco install cuda --version=${{ matrix.cuda }}
106+
107+
- name: Build dependencies
108+
run: |
109+
stack build $STACK_FLAGS --test --no-run-tests --only-dependencies
110+
111+
- name: Build
112+
run: |
113+
stack build $STACK_FLAGS --test --no-run-tests
114+
115+
- name: Test
116+
run: |
117+
stack test accelerate-fft:test-llvm-native $STACK_FLAGS --test-arguments='--hedgehog-tests=50 --hedgehog-shrinks=0 --timeout=60s --num-threads=1'
118+

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
/dist/
22
*.swp
33
stack.yaml
4+
/.stack-work
5+
/stack.yaml.lock

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule ".travis"]
2-
path = .travis
3-
url = https://github.com/tmcdonell/travis-scripts.git

.travis

Lines changed: 0 additions & 1 deletion
This file was deleted.

.travis.yml

Lines changed: 0 additions & 136 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) [2007..2012] The Accelerate Team. All rights reserved.
1+
Copyright (c) [2007..2020] The Accelerate Team. All rights reserved.
22

33
Redistribution and use in source and binary forms, with or without
44
modification, are permitted provided that the following conditions are met:

README.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,30 @@
1-
FFT Component for the Accelerate Array Language
2-
===============================================
1+
<div align="center">
2+
<img width="450" src="https://github.com/AccelerateHS/accelerate/raw/master/images/accelerate-logo-text-v.png?raw=true" alt="henlo, my name is Theia"/>
33

4-
[![Build Status](https://travis-ci.org/tmcdonell/accelerate-fft.svg?branch=master)](https://travis-ci.org/tmcdonell/accelerate-fft)
4+
# FFT components for the Accelerate language
5+
6+
[![GitHub CI](https://github.com/tmcdonell/accelerate-fft/workflows/CI/badge.svg)](https://github.com/tmcdonell/accelerate-fft/actions)
7+
[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/AccelerateHS/Lobby)
8+
<br>
9+
[![Stackage LTS](https://stackage.org/package/accelerate-fft/badge/lts)](https://stackage.org/lts/package/accelerate-fft)
10+
[![Stackage Nightly](https://stackage.org/package/accelerate-fft/badge/nightly)](https://stackage.org/nightly/package/accelerate-fft)
511
[![Hackage](https://img.shields.io/hackage/v/accelerate-fft.svg)](https://hackage.haskell.org/package/accelerate-fft)
612

7-
FFT library for the embedded array language Accelerate. This will use optimised
8-
backend implementations where available. For details on Accelerate, refer to the
9-
[main repository][GitHub].
13+
</div>
14+
15+
FFT library for the embedded array language Accelerate. For details on
16+
Accelerate, refer to the [main repository][GitHub].
17+
18+
The following build flags control whether optimised implementations are used.
19+
Note that enabling these (which is the default) will require the corresponding
20+
Accelerate backend as a dependency:
21+
22+
- `llvm-ptx`: For NVIDIA GPUs
23+
- `llvm-cpu`: For multicore CPUs
24+
25+
Contributions and bug reports are welcome!<br>
26+
Please feel free to contact me through GitHub or [gitter.im][gitter.im].
1027

11-
[GitHub]: https://github.com/AccelerateHS/accelerate
28+
[GitHub]: https://github.com/AccelerateHS/accelerate
29+
[gitter.im]: https://gitter.im/AccelerateHS/Lobby
1230

0 commit comments

Comments
 (0)