Sitelet https://web.archive.org/web/20200611020157/https://github.com/AccelerateHS/accelerate/issues/412
Skip to content
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

Speed up test suite #412

Open
tmcdonell opened this issue Jan 15, 2018 · 3 comments
Open

Speed up test suite #412

tmcdonell opened this issue Jan 15, 2018 · 3 comments

Comments

@tmcdonell
Copy link
Member

@tmcdonell tmcdonell commented Jan 15, 2018

The standard accelerate test suite, used by all the backends, can be quite slow. Several of the tests are significantly slower than the others, for example segmented folds and scans, which I believe is because the reference implementations are very inefficient. Writing some more efficient reference implementations (e.g. using Data.Vector.Unboxed) should help speed things up.

@noughtmare
Copy link
Contributor

@noughtmare noughtmare commented Nov 7, 2019

The doctests take longer than the nofib tests on my machine. I think that is because it has to recompile all modules before it can run the doctests.

@noughtmare
Copy link
Contributor

@noughtmare noughtmare commented Nov 7, 2019 •

Blackscholes is the test that takes the longest on my machine (about 2 seconds). It doesn't seem like it would benefit from using Data.Vector.Unboxed because it is basically only a single map over the array. Maybe the size of the randomly generated arrays can be reduced. Is it really necessary to generate arrays of up to 16384 elements? Reducing it to 1024 makes it run in about 0.1 seconds.

Otherwise maybe the generation of the array can be sped up. Now, it first generates a list and then converts that to an array (maybe some of this is fused away?).

@tmcdonell
Copy link
Member Author

@tmcdonell tmcdonell commented Nov 8, 2019

Generating large test arrays is important for the parallel backends, because they can use different implementations for larger arrays (for example the GPU backends need to use multiple thread blocks after a certain (hardware dependent) size).

It definitely could be a problem with the random number/array generation, we should look into that as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.