PaddedMatrices.jl icon indicating copy to clipboard operation
PaddedMatrices.jl copied to clipboard

New release with the glorious new multithreading?

Open DilumAluthge opened this issue 4 years ago • 6 comments

DilumAluthge avatar Jan 02 '21 16:01 DilumAluthge

I'm trying channel-based multithreading. If it's comparably fast or faster, I'll use that. If not, I'll try to fix ci (I think I fixed the .yml files locally, are spaces vs tabs a problem?) and issue a release assuming tests pass.

chriselrod avatar Jan 02 '21 16:01 chriselrod

(I think I fixed the .yml files locally, are spaces vs tabs a problem?)

Yeah it's gotta be spaces I think. You can try:

  1. Run through any online YAML parser, e.g. https://yaml-online-parser.appspot.com/
  2. Open the YAML files in the GitHub web editor, and usually the linter will let you know if there are problems.

DilumAluthge avatar Jan 02 '21 16:01 DilumAluthge

YAML is so sensitive to tiny whitespace changes.

DilumAluthge avatar Jan 02 '21 17:01 DilumAluthge

I fixed the yamls, and I'll address the test failures shortly.

But a couple questions:

  1. Do you think I should add an @warn on init if Julia has less than NUM_CORES-1 threads?
  2. Do you think I should make jmul(!) thread by default? Note that nested jmul(!)s will not be threaded, so it'd only use threads when they weren't being used anyway. Meaning it shouldn't be invasive, and it also means that existing code like the Tullio benchmark using jmul! won't need to be updated.

chriselrod avatar Jan 03 '21 03:01 chriselrod

  1. Do you think I should add an @warn on init if Julia has less than NUM_CORES-1 threads?

Yes, that makes sense to me.

2. Do you think I should make jmul(!) thread by default? Note that nested jmul(!)s will not be threaded, so it'd only use threads when they weren't being used anyway. Meaning it shouldn't be invasive, and it also means that existing code like the Tullio benchmark using jmul! won't need to be updated.

I don't feel strongly either way. I'd probably lean towards the status quo of having separate functions for threading vs non-threading.

DilumAluthge avatar Jan 04 '21 02:01 DilumAluthge

I've been experimenting with parameters. I want the benchmarks to look a little better before making the release.

I don't feel strongly either way. I'd probably lean towards the status quo of having separate functions for threading vs non-threading.

I added jmul_single_threaded! to have the same behavior as the old jmul!.

chriselrod avatar Jan 04 '21 07:01 chriselrod