-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Rollup of 8 pull requests #139358
Rollup of 8 pull requests #139358
Conversation
Also convert OSVersion into a proper struct for better type-safety.
this also makes `changeSetting` more robust in case it somehow gets called before `main.js` has finished loading.
changes: * Add type signature * Add null checks * getHelpButton and getSettingsButton are only called once, which should marginally improve performance due to less queries. unfortunatly 2 @ts-expect-error was needed, as typescript is unaware the EventTarget is likely an Element.
With this, almost the entire file is fully typechecked, the only exception being the Element.contains(EventTarget) pattern that is used several times, those are annotated with @ts-expect-error
"true" looks like a string value, `true` makes it more clear that we are talking about the actual boolean value.
this allows us to eliminate the last 3 @ts-expect-error in this file.
In accordance with RFC 3771. I also added a stub doc page for the target and renamed the windows-gnullvm page for consistency.
…he_destroyer_of_i686-pc-windows-gnu, r=workingjubilee Demote i686-pc-windows-gnu to Tier 2 In accordance with [RFC 3771](rust-lang/rfcs#3771). FCP has been completed. tracking issue rust-lang#138422 I also added a stub doc page for the target and renamed the windows-gnullvm page for consistency.
Autodiff batching Enzyme supports batching, which is especially known from the ML side when training neural networks. There we would normally have a training loop, where in each iteration we would pass in some data (e.g. an image), and a target vector. Based on how close we are with our prediction we compute our loss, and then use backpropagation to compute the gradients and update our weights. That's quite inefficient, so what you normally do is passing in a batch of 8/16/.. images and targets, and compute the gradients for those all at once, allowing better optimizations. Enzyme supports batching in two ways, the first one (which I implemented here) just accepts a Batch size, and then each Dual/Duplicated argument has not one, but N shadow arguments. So instead of ```rs for i in 0..100 { df(x[i], y[i], 1234); } ``` You can now do ```rs for i in 0..100.step_by(4) { df(x[i+0],x[i+1],x[i+2],x[i+3], y[i+0], y[i+1], y[i+2], y[i+3], 1234); } ``` which will give the same results, but allows better compiler optimizations. See the testcase for details. There is a second variant, where we can mark certain arguments and instead of having to pass in N shadow arguments, Enzyme assumes that the argument is N times longer. I.e. instead of accepting 4 slices with 12 floats each, we would accept one slice with 48 floats. I'll implement this over the next days. I will also add more tests for both modes. For any one preferring some more interactive explanation, here's a video of Tim's llvm dev talk, where he presents his work. https://www.youtube.com/watch?v=edvaLAL5RqU I'll also add some other docs to the dev guide and user docs in another PR. r? ghost Tracking: - rust-lang#124509 - rust-lang#135283
…ests, r=Amanieu Add integer to string formatting tests As discussed in rust-lang#136264, there doesn't seem to have tests to ensure that int to string conversion is performed correctly, only sporadic tests here and there. Now we have some basic tests. :) r? ``@Mark-Simulacrum``
…=Noratrieb Refactor Apple version handling in the compiler Move various Apple version handling code in the compiler out `rustc_codegen_ssa` and into a place where it can be accessed by `rustc_attr_parsing`, which I found to be necessary when doing rust-lang#136867. Thought I'd split it out to make it easier to land, and to make further changes like rust-lang#131477 have fewer conflicts / PR dependencies. There should be no functional changes in this PR. ``@rustbot`` label O-apple r? rust-lang/compiler
replace extra_filename with strict version hash in metrics file names Should resolve the potential issue of overwriting metrics from the same crate when compiled with different features or flags. r? ``@estebank`` try-job: test-various
…ieyouxu Run coretests and alloctests with cg_clif in CI Part of rust-lang/rustc_codegen_cranelift#1290
…t-error-part5, r=notriddle Rustdoc: typecheck settings.js This makes the file fully typechecked with no instances of ```@ts-expect-error``` and no type casts. r? ``@notriddle``
…7970, r=fmease Fix 2024 edition doctest panic output Fixes rust-lang#137970. The problem was that the output was actually displayed by rustc itself because we're exiting with `Result<(), String>`, and the display is really not great. So instead, we get the output, we print it and then we return an `ExitCode`. r? `@aDotInTheVoid`
@bors r+ rollup=never p=5 |
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
☔ The latest upstream changes (presumably #139354) made this pull request unmergeable. Please resolve the merge conflicts. |
Successful merges:
Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup