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

pkgimg alloc count disparity #48898

Open
daviehh opened this issue Mar 5, 2023 · 2 comments
Open

pkgimg alloc count disparity #48898

daviehh opened this issue Mar 5, 2023 · 2 comments
Labels
bug Indicates an unexpected problem or unintended behavior pkgimage

Comments

@daviehh
Copy link
Contributor

daviehh commented Mar 5, 2023

May be related to #48215

The allocation count when using pkgimg may be off by quite a bit, setup a simple package here to show this issue:

test with

using report_alloc

@time report_alloc.do_ode(); # first JIT run

@time report_alloc.do_ode(); # running compiled

default (no additional arguments/sratup files), i.e. using pkgimg

0.001121 seconds (24.70 k allocations: 1.124 MiB)

with julia --pkgimages=no

0.000862 seconds (10.51 k allocations: 925.016 KiB)

for reference, julia 1.8

0.001279 seconds (10.51 k allocations: 925.094 KiB)

The allocation count is quite higher for the default case (using pkgimg), and the difference may be more pronounced for more complex packages or when more types of function calls are precompiled.

julia> versioninfo()
Julia Version 1.9.0-beta4
Commit b75ddb787ff (2023-02-07 21:53 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.5.0)
  CPU: 10 × Apple M1 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
  Threads: 1 on 8 virtual cores
Environment:
  JULIA_MATHLINK = /Applications/Mathematica.app/Contents/Frameworks/mathlink.framework
  JULIA_MATHKERNEL = /Applications/Mathematica.app/Contents/MacOS/MathKernel
@timholy
Copy link
Sponsor Member

timholy commented Mar 5, 2023

Do you get the same result on nightly? There were some recent changes that might fix this.

@daviehh
Copy link
Contributor Author

daviehh commented Mar 5, 2023

Yes, same result on nightly

Julia Version 1.10.0-DEV.703
Commit eb36cb9e7d0 (2023-03-04 18:30 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.3.0)
  CPU: 10 × Apple M1 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
  Threads: 1 on 8 virtual cores

@giordano giordano added bug Indicates an unexpected problem or unintended behavior pkgimage labels Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior pkgimage
Projects
None yet
Development

No branches or pull requests

3 participants