Skip to content

Fix benchmarks #180

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

Merged
merged 2 commits into from
Apr 22, 2025
Merged

Fix benchmarks #180

merged 2 commits into from
Apr 22, 2025

Conversation

yebai
Copy link
Member

@yebai yebai commented Apr 15, 2025

Fixed some minor issues in benchmarks. It now runs but produces the error below

julia> benchmark_driver!(rosenbrock, x)

       ####################################################################
benchmarking rosenbrock...
ERROR: Unhandled stmt $(Expr(:loopinfo, Symbol("julia.simdloop"), nothing)) of type Expr
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] (::Libtask.var"#14#26"{})(::Tuple{…})
    @ Libtask ~/.julia/packages/Libtask/Aw9k4/src/copyable_task.jl:708
  [3] iterate
    @ ./generator.jl:48 [inlined]
  [4] collect(itr::Base.Generator{Base.Iterators.Enumerate{…}, Libtask.var"#14#26"{…}})
    @ Base ./array.jl:791
  [5] map
    @ ./abstractarray.jl:3399 [inlined]
  [6] (::Libtask.var"#13#25"{})(::Tuple{…})
    @ Libtask ~/.julia/packages/Libtask/Aw9k4/src/copyable_task.jl:552
  [7] iterate
    @ ./generator.jl:48 [inlined]
  [8] collect_to!(dest::Vector{…}, itr::Base.Generator{…}, offs::Int64, st::Tuple{…})
    @ Base ./array.jl:849
  [9] collect_to_with_first!(dest::Vector{…}, v1::Vector{…}, itr::Base.Generator{…}, st::Tuple{…})
    @ Base ./array.jl:827
 [10] collect(itr::Base.Generator{Base.Iterators.Zip{…}, Libtask.var"#13#25"{…}})
    @ Base ./array.jl:801
 [11] map(f::Function, A::Base.Iterators.Zip{Tuple{Vector{Libtask.BasicBlockCode.BBlock}, Vector{Vector{}}, Vector{Vector{}}}})
    @ Base ./abstractarray.jl:3399
 [12] derive_copyable_task_ir(ir::Libtask.BasicBlockCode.BBCode)
    @ Libtask ~/.julia/packages/Libtask/Aw9k4/src/copyable_task.jl:551
 [13] build_callable(sig::Type{Tuple{typeof(rosenbrock), Vector{Float64}, Nothing}})
    @ Libtask ~/.julia/packages/Libtask/Aw9k4/src/copyable_task.jl:59
 [14] TapedTask(::Nothing, ::Function, ::Vararg{Any}; kwargs::@Kwargs{})
    @ Libtask ~/.julia/packages/Libtask/Aw9k4/src/copyable_task.jl:202
 [15] TapedTask(::Nothing, ::Function, ::Vararg{Any})
    @ Libtask ~/.julia/packages/Libtask/Aw9k4/src/copyable_task.jl:199
 [16] benchmark_driver!(f::Function, x::Vector{Float64}; f_displayname::String)
    @ Main ./REPL[4]:5
 [17] benchmark_driver!(f::Function, x::Vector{Float64})
    @ Main ./REPL[4]:1
 [18] top-level scope
    @ REPL[7]:1
Some type information was truncated. Use `show(err)` to see complete types.

@yebai yebai requested a review from willtebbutt April 15, 2025 18:31
Copy link
Member

@willtebbutt willtebbutt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this -- the error is something that needs fixing in the main PR (it's just an IR instruction that we haven't explicitely written out support for yet).

I'll merge this into my PR.

@willtebbutt willtebbutt merged commit 1198038 into wct/refactor Apr 22, 2025
15 of 20 checks passed
@willtebbutt willtebbutt deleted the yebai-patch-1 branch April 22, 2025 09:14
yebai added a commit that referenced this pull request May 9, 2025
* Rework test cases a bit

* Add formatter config

* Update gitignore to remove redundant items

* Bump minor version because small breaking change

* Tell users that various old types have been actually removed

* Formatting of perf

* Remove old code

* Rework includes in package and runtests

* More formatting

* Add in copyable_task files

* Clean up runtests

* Update project deps etc

* Drop 1.7 from CI

* Initial transfer of code

* Fix bug for function with no produce statements

* Test for construction of new mutable struct

* Fix more test cases

* Add another test case

* More test cases

* More work

* Formatting

* Remove unhelpful docstring

* Relax Test compat a bit

* Lower minor version to make integration tests run

* Handle code_coverage_effect

* Some tweaks + docs

* Fix copying

* Formatting

* Enable more tests

* Implement dynamic scope

* Test dynamic scope correctness

* README and NEWS overhaul

* Export get_dynamic_scope and set_dynamic_scope

* Placeholder docstring for produce

* Initial docs

* Ignore build folder of docs

* Update cache action

* Formatting

* Ignore all top-level manifest files

* Add dependency on ScopedValues

* Fix on LTS

* Do not check for stale deps on 1.11

* Some docs

* Docs action

* Tidy up docs

* Tidy up docs slightly

* Refactor + basic nested produce handling

* Fomatting

* Dynamic nested calls and uses of return values of calls which might produce

* Fix docs build

* Update CI

* Handle callable structs

* Fix docs and add doctest

* Test kwargs

* More tests

* Fix inference bug

* Improve documentation

* Performance enhancements

* Caching and tweaks

* Fix docs build

* Docs and tidy up

* Include specifics from Mooncake

* Tidy up further

* Tidy up further

* Remove undefined export

* Bump patch version

* Test produce global performance

* Remove more references to dynamic scope

* Document type assertion

* Fix benchmarks  (#180)

* Update benchmark.jl

* Update benchmark.jl

* Apply suggestions from code review

Co-authored-by: Markus Hauru <[email protected]>

* Fix loopinfo expression

* Remove redundant extended help section

* Note why __v exists

* Sort out consume

* Explain produce function

* Document callable_ret_type

* Update benchmark.jl

* Docstring for build_callable

* Tweaks to build_callable and docs

* Document aliasing

* Document bbcode usage

* More docs

* Formatting and remove unnecessary import

* Remove redundant comment

* Fix test wording

* Remove redundant test cases

* Fix typo

* Formatting

* Docstring

* Fix docs bulid

* Docstring for fresh_copy

* More docs

* Expand on refs and misty closure usage

* Explain gotoifnot a bit more carefully

* Link to GotoIfNot in Julia docs

* Update Documentation.yml (#181)

* Apply suggestions from code review

Co-authored-by: Markus Hauru <[email protected]>

* Update src/copyable_task.jl

Co-authored-by: Markus Hauru <[email protected]>

* Update src/copyable_task.jl

Co-authored-by: Markus Hauru <[email protected]>

---------

Co-authored-by: Hong Ge <[email protected]>
Co-authored-by: Markus Hauru <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants