-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Rollup of 5 pull requests #151183
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 5 pull requests #151183
Conversation
Add a rustc intrinsic `amdgpu_dispatch_ptr` to access the kernel dispatch packet on amdgpu. The HSA kernel dispatch packet contains important information like the launch size and workgroup size. The Rust intrinsic lowers to the `llvm.amdgcn.dispatch.ptr` LLVM intrinsic, which returns a `ptr addrspace(4)`, plus an addrspacecast to `addrspace(0)`, so it can be returned as a Rust reference. The returned pointer/reference is valid for the whole program lifetime, and is therefore `'static`. The return type of the intrinsic (`*const ()`) does not mention the struct so that rustc does not need to know the exact struct type. An alternative would be to define the struct as lang item or add a generic argument to the function. Short version: ```rust #[cfg(target_arch = "amdgpu")] pub fn amdgpu_dispatch_ptr() -> *const (); ```
Co-authored-by: ericinB <ericbncer@gmail.com>
merge privacy/privacy-sanity-2 with privacy/privacy-sanity.rs Add comment to generics/type-args-on-module-in-bound.rs Add comment to array-slice-vec/closure-in-array-eln.rs Add comment to array-slice-vec/return-in-array-len.rs Merge for-loop-while/break-outside-loop-2.rs with for-loop-while/break-outside-loop.rs Add comment to macros/column-macro-collision.rs Add comment to privacy/private-extern-fn-visibility.rs Add comment to mismatched_types/vec-hashset-type-mismatch.rs Merge std-sync-right-kind-impls-2.rs with std-sync-right-kind-impls.rs Add comment to array-slice-vec/slice-of-multi-ref.rs Add comment to mismatched_types\vec-hashset-type-mismatch.rs Add comment to derives/derive-hygiene-struct-builder.rs Add comment to label/undeclared-label-span.rs Add comment to label\undeclared-label-span.rs Add comment to mismatched_types/array-repeat-unit-struct.rs
…ubilee Add amdgpu_dispatch_ptr intrinsic There is an ongoing discussion in rust-lang#150452 about using address spaces from the Rust language in some way. As that discussion will likely not conclude soon, this PR adds one rustc_intrinsic with an addrspacecast to unblock getting basic information like launch and workgroup size and make it possible to implement something like `core::gpu`. Add a rustc intrinsic `amdgpu_dispatch_ptr` to access the kernel dispatch packet on amdgpu. The HSA kernel dispatch packet contains important information like the launch size and workgroup size. The Rust intrinsic lowers to the `llvm.amdgcn.dispatch.ptr` LLVM intrinsic, which returns a `ptr addrspace(4)`, plus an addrspacecast to `addrspace(0)`, so it can be returned as a Rust reference. The returned pointer/reference is valid for the whole program lifetime, and is therefore `'static`. The return type of the intrinsic (`&'static ()`) does not mention the struct so that rustc does not need to know the exact struct type. An alternative would be to define the struct as lang item or add a generic argument to the function. Is this ok or is there a better way (also, should it return a pointer instead of a reference)? Short version: ```rust #[cfg(target_arch = "amdgpu")] pub fn amdgpu_dispatch_ptr() -> *const (); ``` Tracking issue: rust-lang#135024
Unify and deduplicate From<T> float tests cc rust-lang#141726 Unify the From<bool> tests from f16.rs and f128.rs into a single float_test! in mod.rs.
Silence unused type param error on struct parse error
Given
```
#[derive(Clone)]
struct B<T> {
a: A<(T, u32)> // <- note, comma is missing here
/// asdf
b: u32,
}
```
do not emit unnecessary "unused `T`" error.
Fix rust-lang#141403.
Tidying up `tests/ui/issues` 15 tests [8/N] > [!NOTE] > Intermediate commits are intended to help review, but will be squashed add comment commit prior to merge. part of rust-lang#133895 There are some tests named {xxx}-2, which are meant to be merged with {xxx}. r? Kivooeo
Stabilise `EULER_GAMMA` and `GOLDEN_RATIO` constants for `f32` and `f64`. Tracking issue: rust-lang#146939 This PR renames the `EGAMMA` and `PHI` constants to `EULER_GAMMA` and `GOLDEN_RATIO` – respectively – and stabilises them under these names for `f32` and `f64`: ```rust // core::f16::consts pub const GOLDEN_RATIO: f16; pub const EULER_GAMMA: f16; // core::f32::consts pub const GOLDEN_RATIO: f32; pub const EULER_GAMMA: f32; // core::f64::consts pub const GOLDEN_RATIO: f64; pub const EULER_GAMMA: f64; // core::f128::consts pub const GOLDEN_RATIO: f128; pub const EULER_GAMMA: f128; ``` The feature gate for the stabilised items is also changed to `euler_gamma_golden_ratio`.
|
@bors r+ rollup=never p=5 |
This comment has been minimized.
This comment has been minimized.
|
📌 Perf builds for each rolled up PR:
previous master: 18ae990755 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 18ae990 (parent) -> bcf787a (this PR) Test differencesShow 378 test diffsStage 1
Stage 2
Additionally, 280 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard bcf787a7805d6f26586409eb0ed7e4a739c7d687 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (bcf787a): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary 2.0%, secondary 2.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -2.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 471.758s -> 473.462s (0.36%) |
Successful merges:
tests/ui/issues15 tests [8/N] #151159 (Tidying uptests/ui/issues15 tests [8/N])EULER_GAMMAandGOLDEN_RATIOconstants forf32andf64. #151164 (StabiliseEULER_GAMMAandGOLDEN_RATIOconstants forf32andf64.)r? @ghost
Create a similar rollup