-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ghc 8.0 accelerate rewrite #54
base: ghc-8.0
Are you sure you want to change the base?
Ghc 8.0 accelerate rewrite #54
Conversation
Merging upstream changes to local master
initial implementations of Accelerate Vectors are working Algebra.Matrix Remove question about whether Heyting algebras are cancellative semigroups. Also add a comment that they're not cancellative in general, in case the question arises again. (Counterexample: open intervals in R.) Change wording Switch from ^ to && for the subalgebra operation Update README.md finished initial implementation updating packages removing llvm acclerate-llvm is building
Sorry I didn't see this earlier. I'm guessing the reason you're getting
is due to a few lines like:
Here you are not wrapping the scalar value properly for the accelerate framwork. I think on this line, however, you are wrapping it properly:
Does that make sense? Unfortunately, I can't actually test this theory right now because Github is saying there's a merge conflict. I can take a closer look at the multiplication issue if you resolve the conflict first. |
Merged current ghc-8.0 branch
I've squashed the commits and fixed the conflicts. I think you were seeing some of the earlier commits as I rewrote all the instances to be in terms of And I removed the See if the PR state makes more sense now. |
Thanks. It'll probably be Thursday/Friday before I get a chance to look at this. |
What version of accelerate-cuda are you using? I can't get your branch to compile because the latest version on hackage (0.15.1.1) doesn't support ghc 8. Just looking through your edits, I think the problem might be with this line:
AFAICT, you don't define anywhere what
|
I'll change that tonight and investigate. There are git commits referenced in the stack config file that should pull the correct combination of packages. It was a little difficult as only certain pulls of the master branch of accelerate compile with the various subpackages (and accelerate-llvm still has no ghc-8.0 candidate, although it looks like some progress is being made towards that end). |
Sorry, I've just been snatching 15 minutes here and there to work on this and I also had the misfortune of needing to update OSX and fix the resulting toolchain breakage. I reworked the the code and the multiplication error persists. Did you ever manage to build with the acclerate pacakges? |
@mikeizbicki \ping! there's still some issues with this rewrite, the library code compiles but examples usages don't. I really want to see it move along but I don't have the resources to work on it at the moment so the trail is cold, unfortunately. related: |
Examples are calculating but the laws are failing, unsurprisingly.
Conflicts: src/SubHask/Algebra/Accelerate/Vector.hs
Vector now compiles and computes the examples (up until the outerproduct) in The confusion was that sometimes accelerate returns I'm going to continue with the |
Initial rewrite of Vector.hs complete Merged branch ghc-8.0-accelerate-Acc-Exp into ghc-8.0-accelerate-Acc-rewrite
With the exception of
zero
,dim
andimap
the vector-based instances are compiling in ghc-8.0. I've added them to the test suite but the multiplication test fails withThis is undoubtedly because I had to define the ValidAcc type with the constraint(s)
to get the library to compile. I'm not totally sure how to go about refactoring, though, since accelerate will return a
A.Acc (A.Scalar a)
(this is really an array singleton) for any scalar value resulting from anArray
computation. Do you have any suggestions?Also, I see that Tensor_algebra and a few other instances aren't currently in ghc-8.0. I guess these should just be omitted for now?