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

@time seems to report incorrect "compilation time" percentage since the pkgimage merge #48024

Closed
Krastanov opened this issue Dec 28, 2022 · 1 comment · Fixed by #48033
Closed
Labels
kind:bug Indicates an unexpected problem or unintended behavior pkgimage
Milestone

Comments

@Krastanov
Copy link

Since the merge of the awesome pkgimage support, @time occasionally shows more than 100% compilation time, which obviously is nonsensical.

Noticed first here: #47184 (comment)

A misguided documentation pull request was submitted here: #47980

MWE that does not require installing packages:

On the nightly just after merging the pkgimages PR

julia> double(x::Real) = 2x
       calldouble(container) = double(container[1])
       calldouble2(container) = calldouble(container)
calldouble2 (generic function with 1 method)

julia> @time @eval calldouble([1.0])
  0.015989 seconds (9.68 k allocations: 636.003 KiB, 41.47% compilation time)
2.0

julia> @time @eval calldouble2(1.0)
  0.012463 seconds (3.53 k allocations: 250.709 KiB, 111.08% compilation time)
2.0

julia> versioninfo()
Julia Version 1.10.0-DEV.204
Commit a2db90fe8d9 (2022-12-27 13:46 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 7 1700 Eight-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, znver1)
  Threads: 8 on 16 virtual cores

On 1.8.0

julia> double(x::Real) = 2x
       calldouble(container) = double(container[1])
       calldouble2(container) = calldouble(container)
calldouble2 (generic function with 1 method)

julia> @time @eval calldouble([1.0])
  0.012558 seconds (7.12 k allocations: 412.803 KiB, 42.40% compilation time)
2.0

julia> @time @eval calldouble2(1.0)
  0.008551 seconds (3.41 k allocations: 208.565 KiB, 95.67% compilation time)
2.0

julia> versioninfo()
Julia Version 1.8.0
Commit 5544a0fab76 (2022-08-17 13:38 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 7 1700 Eight-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, znver1)
  Threads: 8 on 16 virtual cores
@gbaraldi gbaraldi added this to the 1.9 milestone Dec 28, 2022
@LilithHafner LilithHafner added the kind:bug Indicates an unexpected problem or unintended behavior label Dec 29, 2022
@LilithHafner
Copy link
Member

Well found, @Krastanov. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Indicates an unexpected problem or unintended behavior pkgimage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants