Coder Social home page Coder Social logo

Other timing tools about snoopcompile.jl HOT 4 CLOSED

aminya avatar aminya commented on August 29, 2024
Other timing tools

from snoopcompile.jl.

Comments (4)

aminya avatar aminya commented on August 29, 2024 1

I used @timev, and clearly shows the improvements 🚀 . People thought that the only improvement that we get is in the inference time.

For example, for Zygote:

Running @timev in running the tests shows that we get:

  • 10s raw improvement
  • 23 MB less memory usage
  • 1GiB less memory allocation.
Details
│ Precompile Deactivated Benchmark
# for using Zygote:
└ Inference time (ms): 	23654.842
@timev result (This has some noise).
391.374697 seconds (628.72 M allocations: 31.522 GiB, 4.16% gc time)
elapsed time (ns): 391374697041
gc time (ns):      16295209095
bytes allocated:   33846029551
pool allocs:       628513544
non-pool GC allocs:190530
malloc() calls:    11983
realloc() calls:   85
GC pauses:         503
full collections:  9
│ Precompile Activated Benchmark
┌ Info: 
└ Inference time (ms): 	22565.431
@timev result (This has some noise).
382.785964 seconds (605.11 M allocations: 30.360 GiB, 3.93% gc time)
elapsed time (ns): 382785964109
gc time (ns):      15042733929
bytes allocated:   32598547445
pool allocs:       604912736
non-pool GC allocs:184276
malloc() calls:    11737
realloc() calls:   81
GC pauses:         467
full collections:  6

https://github.com/aminya/Zygote.jl/runs/646094164?check_suite_focus=true#step:6:123

from snoopcompile.jl.

timholy avatar timholy commented on August 29, 2024 1

@snoopi is for discovery and for measuring just one thing, inference time. @timev measures a whole bunch of things, including load time, LLVM time, execution time, etc. In the end it's closer to what people will want to reduce, so it's not bad to use it to decide whether the precompiles are worth it. E.g., #74.

In general I worry that too many people use SnoopCompile unthinkingly; for me, the "discovery" part is by far the most important and I generally prefer to write the precompile file by hand. But I recognize I'm probably an outlier. Recommending @timev might help people realize that, for example, setting a higher tmin (and thus precompiling less) might actually reduce times they care about.

from snoopcompile.jl.

aminya avatar aminya commented on August 29, 2024

If this is the case, should I just use @timev for benchmarking isntead of @snoopi? People seem to have better intuition for it.

    julia_code_timev = """
    using $package_name
    @timev begin
        $(string(snoop_script));
    end
    @info("The above is @timev result (This has some noise).")
    """
    julia_cmd_timev = `julia --project=@. -e $julia_code_timev`

https://github.com/aminya/SnoopCompile.jl/blob/4c5556de806fd2c9fcd7c82e606c6162f102b195/src/bot/snoopi_bench.jl#L33-L40

from snoopcompile.jl.

aminya avatar aminya commented on August 29, 2024

People are less concerned with the precompiling time, but with its effect on the performance. Using @timev helps with this for sure. I think I can close this, as this will be solved in #71

from snoopcompile.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.