Skip to content

Latest commit

 

History

History
141 lines (107 loc) · 11.7 KB

CHANGELOG.md

File metadata and controls

141 lines (107 loc) · 11.7 KB

OhMyThreads.jl Changelog

Version 0.7.0

  • BREAKING We now use ChunkSplitters version 3.0. The function OhMyThreads.chunks has been renamed to OhMyThreads.index_chunks. The new functions index_chunks and chunks (different from the old one with the same name!) are now exported. See ChunkSplitters.jl for more information.
  • BREAKING If you provide a chunks or index_chunks as input we now disable the internal chunking without a warning. Previously, we did show a warning unless you had set chunking=false. In contrast, we now throw an error when you set any incompatible chunking related keyword arguments.
  • Deprecation The split options :batch and :scatter are now deprecated (they still work but will be dropped at some point). Use :consecutive and :roundrobin, respectively, instead.
  • Enhancement The split keyword argument can now also be a <: OhMyThreads.Split. Compared to providing a Symbol, the former can potentially give better performance. For example, you can replace :consecutive by OhMyThreads.Consecutive() and :roundrobin by OhMyThreads.RoundRobin().
  • Feature ChannelLike is a new public (but not exported) type. ChannelLike(itr) provide a way to iterate over itr in a concurrency safe manner similar to Channel. See the docstring for more details. (#121)
  • Enhancement ChannelLike is used internally for the GreedyScheduler when chunking=true. This improves performance overall but it is especially noticeable when the number of chunks is large. (#121)

Version 0.6.2

  • Enhancement Added API support for enumerate(chunks(...)). Best used in combination with chunking=false

Version 0.6.1

Version 0.6.0

  • BREAKING Drop support for Julia < 1.10.

Version 0.5.3

  • Enhancement For the special/fake "macros" like, e.g., @set, support the verbose form OhMyThreads.@set within a @tasks for-loop (#107).

Version 0.5.2

  • Enhancement For empty input (e.g. Float64[] or 11:10) behavior is now aligned with the serial functions in Base.

Version 0.5.1

  • Feature Within a parallel @tasks block one can now mark a region with @one_by_one. This region will be run by one task at a time ("critical region").
  • Feature Within a @tasks block one can now mark a region as with @only_one. This region will be run by a single parallel task only (other tasks will skip over it).
  • Experimental Added tentative support for @barrier in @tasks blocks. See ?OhMyThreads.Tools.@barrier for more information. Note that this feature is experimental and not part of the public API (i.e. doesn't fall under SemVer).
  • Info Compat bounds for BangBang.jl have been relaxed to include v0.3.40

Version 0.5.0

  • Feature The parallel functions (e.g. tmapreduce etc.) now support scheduler::Symbol besides scheduler::Scheduler. To configure the selected scheduler (e.g. set nchunks etc.) one may now pass keyword arguments directly into the parallel functions (they will get passed on to the scheduler constructor). Example: tmapreduce(sin, +, 1:10; chunksize=2, scheduler=:static). Analogous support has been added to the macro API: (Most) settings (@set name = value) will now be passed on to the parallel functions as keyword arguments (which then forward them to the scheduler constructor). Note that, to avoid ambiguity, we don't support this feature for scheduler::Scheduler but only for scheduler::Symbol.
  • Feature Added a SerialScheduler that can be used to turn off any multithreading.
  • Feature Added OhMyThreads.WithTaskLocals that represents a closure over TaskLocalValues, but can have those values materialized as an optimization (using OhMyThreads.promise_task_local)
  • Feature In the case nchunks > nthreads(), the StaticScheduler now distributes chunks in a round-robin fashion (instead of either implicitly decreasing nchunks to nthreads() or throwing an error).
  • Feature @set init = ... may now be used to specify an initial value for a reduction (only has an effect in conjuction with @set reducer=... and triggers a warning otherwise).
  • Enhancement SerialScheduler and DynamicScheduler now support the keyword argument ntasks as an alias for nchunks.
  • Enhancement Made @tasks use OhMyThreads.WithTaskLocals automatically as an optimization.
  • Enhancement Uses of @local within @tasks no-longer require users to declare the type of the task local value, it can be inferred automatically if a type is not provided.
  • Enhancement Made using OhMyThreads: ... more explicit in examples in the documentation and docstrings.
  • BREAKING The DynamicScheduler (default) and the StaticScheduler now support a chunksize argument to specify the desired size of chunks instead of the number of chunks (nchunks). Note that chunksize and nchunks are mutually exclusive. (This is unlikely to break existing code but technically could because the type parameter has changed from Bool to ChunkingMode.)
  • BREAKING The greedy scheduler now supports chunking (similar to the static and dynamic scheduler). You can opt into it with, e.g., chunking=true. (This is unlikely to break existing code but technically could because we introduced a new type parameter for GreedyScheduler.)
  • Breaking DynamicScheduler and StaticScheduler don't support nchunks=0 or chunksize=0 any longer. Instead, chunking can now be turned off via an explicit new keyword argument chunking=false.
  • BREAKING Within a @tasks block, task-local values must from now on be defined via @local instead of @init (renamed).
  • BREAKING The (already deprecated) SpawnAllScheduler has been dropped.
  • BREAKING The default value for ntasks/nchunks for DynamicScheduler has been changed from 2*nthreads() to nthreads(). With the new value we now align with @threads :dynamic. The old value wasn't giving good load balancing anyways and choosing a higher value penalizes uniform use cases even more. To get the old behavior, set nchunks=2*nthreads().
  • Bugfix When using the GreedyScheduler in combination with tmapreduce (or functions that build upon it) there could be non-deterministic errors in some cases (small input collection, not much work per element, see #82). These cases should be fixed now.
  • Bugfix We now handle empty collections as input in tmapreduce and tforeach explicitly (#86). Our general philosophy is to try match the behavior of the serial Base functions.

Version 0.4.6

  • Feature Introduction of macro API (@tasks) that transforms for loops into corresponding tforeach, tmapreduce, and tmap calls. This new API enables us to facilitate certain patterns, like defining task local values.

Version 0.4.5

  • Enhancement Improved the thread-safe storage section of the documentation.

Version 0.4.4

  • Bugfix Fixed a type specification bug that could occur when passing a Chunk into, say, tmapreduce.

Version 0.4.3

  • Feature Forward (but don't export) the macros @fetch and @fetchfrom from StableTasks.jl (v0.1.5), which are analogous to the same-named macros in Distributed.jl.

Version 0.4.2

  • Feature DynamicScheduler now supports nchunks=0, which turns off internal chunking entirely.
  • Deprecation SpawnAllScheduler is now deprecated in favor of DynamicScheduler(; nchunks=0).
  • Feature Partial support for passing in a ChunkSplitters.Chunk when using DynamicScheduler (default). In this case, one should generally use DynamicScheduler(; nchunks=0), i.e. turn off internal chunking.
  • Feature StaticScheduler now supports nchunks=0, which turns off internal chunking entirely. Only works for input that has <= nthreads() elements.

Version 0.4.1

  • Feature Added a new, simple SpawnAllScheduler that spawns a task per input element (can be a lot of tasks!).
  • Info Added downgrade_CI which makes sure the testsuite works on the oldest versions of dependancies.

Version 0.4.0

  • BREAKING Instead of taking keyword arguments schedule, nchunks, split directly, we now use Scheduler structs to specify scheduling options (#22). The latter can be provided to all API functions via the new scheduler keyword argument.
  • BREAKING The default scheduler (DynamicScheduler) now, by default, creates 2*nthreads() tasks to provide load-balancing by default. The old behavior can be restored with DynamicScheduler(; nchunks=nthreads()).
  • Enhancement We reject unsupported keyword arguments early and give a more helpful error message.

Version 0.3.1

  • Bugfix The documented Public API wasn't updated in 0.3.0 and thus out of sync with the actual API. Fixed in this version.

Version 0.3.0

  • BREAKING We don't (re-)export chunks anymore. Use OhMyThreads.chunks instead.
  • Feature We now provide OhMyThreads.TaskLocalValue (from TaskLocalValue.jl) as a nice solution for task-local values. See the corresponding page in the documentation (#25).
  • Enhancement Added a few missing @views.
  • Enhancement Added three examples to the docs: monte carlo, julia set, and trapazoidal integration.
  • Enhancement Improved all docstrings of the exported API functions. Keyword options are now only shown in the extended help (e.g. ??tmap) (#27).
  • Enhancement Added a translation page that hopefully helps with the Base.Threads → OhMyThreads.jl transition (#24).

Version 0.2.1

  • Enhancement Basic documentation.
  • Enhancement Making ChunkSplitters available internally.

Version 0.2.0

  • Initial version.