Tests: select's callers pass the widest-pin choice
c53ea4164e changed lower::select::select to take (inputs, WidestPin) but left ten test callers
in crates/metal2vulkan/src/tests passing the inputs alone, so the metal2vulkan lib tests (and
workspace clippy --all-targets) did not compile. Each now passes WidestPin::Weighed, the choice
every first plan makes.
Correction to c53ea4164e's message: it says checks job 25736 was green. It was not. The job's
wrapper exited 0, but inside it clippy and the metal2vulkan suite both exited 101 (these ten
E0308 errors); only rustdoc passed. That commit's test and suite claims are unverified until
this commit's check.
Verified: job 25736's log shows the ten errors. This fix's check is job 25748 (msi: workspace
clippy, then the full metal2vulkan suite). Tests only: no version bump.
This commit is contained in:
1 parent
5865f5b2e5
commit
f10af8e35a
10 files changed
+69
-10
No files matched your search
@@ -39,6 +39,7 @@ use crate::error::{Error, Feature, LowerFamily, Needs, Unsupported};
|
||||
use crate::library::FunctionConstantValues;
|
||||
use crate::lower::emit::emit_module;
|
||||
use crate::lower::select::{select, LowerInputs, Plan};
|
||||
use crate::lower::simd::WidestPin;
|
||||
use crate::memory::static_root::analyze_memory;
|
||||
use crate::pipeline::compile::{compile_bitcode, plan_bitcode, EntryRef};
|
||||
use crate::pipeline::facts::{RuntimeFact, UniformViewChoice};
|
||||
@@ -1039,7 +1040,7 @@ fn typed_module_with(
|
||||
};
|
||||
let spec = air::specialize(decoded, &req, m).expect("specialize");
|
||||
let memory = analyze_memory(&spec, p, m).expect("analyze");
|
||||
let plan = select(&spec, &memory, p, inputs, m).expect("select");
|
||||
let plan = select(&spec, &memory, p, (inputs, WidestPin::Weighed), m).expect("select");
|
||||
let module = emit_module(&spec, &plan, m).expect("emit").module;
|
||||
verify(&module, p, m).expect("verify");
|
||||
(plan, module)
|
||||
|
||||
@@ -23,6 +23,7 @@ use crate::error::{Capability, Error, Feature, LowerFamily, Needs};
|
||||
use crate::library::FunctionConstantValues;
|
||||
use crate::lower::emit::emit_module;
|
||||
use crate::lower::select::{select, LowerInputs};
|
||||
use crate::lower::simd::WidestPin;
|
||||
use crate::memory::static_root::analyze_memory;
|
||||
use crate::pipeline::artifact::PrecisionNote;
|
||||
use crate::pipeline::compile::{plan_bitcode, EntryRef};
|
||||
@@ -1099,7 +1100,14 @@ fn interpret(bitcode: &[u8], entry: &str, p: &DeviceProfile) -> u32 {
|
||||
};
|
||||
let spec = air::specialize(decoded, &req, &mut m).expect("specialize");
|
||||
let memory = analyze_memory(&spec, p, &mut m).expect("memory");
|
||||
let plan = select(&spec, &memory, p, &LowerInputs::new(), &mut m).expect("select");
|
||||
let plan = select(
|
||||
&spec,
|
||||
&memory,
|
||||
p,
|
||||
(&LowerInputs::new(), WidestPin::Weighed),
|
||||
&mut m,
|
||||
)
|
||||
.expect("select");
|
||||
let module = emit_module(&spec, &plan, &mut m).expect("emit").module;
|
||||
let res = Resources {
|
||||
buffers: vec![Buffer {
|
||||
|
||||
@@ -32,6 +32,7 @@ use crate::error::{Capability, Error, Feature, LowerFamily, Unsupported};
|
||||
use crate::library::FunctionConstantValues;
|
||||
use crate::lower::emit::emit_module;
|
||||
use crate::lower::select::{select, LowerInputs, Plan};
|
||||
use crate::lower::simd::WidestPin;
|
||||
use crate::memory::static_root::analyze_memory;
|
||||
use crate::pipeline::compile::{compile_bitcode, plan_bitcode, EntryRef};
|
||||
use crate::pipeline::facts::RuntimeFact;
|
||||
@@ -1102,7 +1103,7 @@ fn typed_module_with(
|
||||
};
|
||||
let spec = air::specialize(decoded, &req, m).expect("specialize");
|
||||
let memory = analyze_memory(&spec, p, m).expect("analyze");
|
||||
let plan = select(&spec, &memory, p, inputs, m).expect("select");
|
||||
let plan = select(&spec, &memory, p, (inputs, WidestPin::Weighed), m).expect("select");
|
||||
let module = emit_module(&spec, &plan, m).expect("emit").module;
|
||||
verify(&module, p, m).expect("verify");
|
||||
(plan, module)
|
||||
|
||||
@@ -20,6 +20,7 @@ use crate::device::requirements::VkFeature;
|
||||
use crate::device::{Device, DevicePolicy, DeviceProfile};
|
||||
use crate::lower::emit::emit_module;
|
||||
use crate::lower::select::{select, LowerInputs};
|
||||
use crate::lower::simd::WidestPin;
|
||||
use crate::memory::static_root::analyze_memory;
|
||||
use crate::pipeline::sym::{ResourceKind, ResourceSlot, Stage};
|
||||
use crate::pipeline::testing::{
|
||||
@@ -310,7 +311,7 @@ fn interpret(
|
||||
let memory = analyze_memory(&spec, p, &mut m).expect("memory");
|
||||
let mut inputs = LowerInputs::new();
|
||||
inputs.open_cl_mode = open_cl_mode;
|
||||
let plan = select(&spec, &memory, p, &inputs, &mut m).expect("select");
|
||||
let plan = select(&spec, &memory, p, (&inputs, WidestPin::Weighed), &mut m).expect("select");
|
||||
let module = emit_module(&spec, &plan, &mut m).expect("emit").module;
|
||||
let input: Vec<u8> = operands
|
||||
.iter()
|
||||
|
||||
@@ -25,6 +25,7 @@ use crate::device::{DevicePolicy, DeviceProfile};
|
||||
use crate::lower::arith::narrow::quantize_form;
|
||||
use crate::lower::emit::emit_module;
|
||||
use crate::lower::select::{select, LowerInputs};
|
||||
use crate::lower::simd::WidestPin;
|
||||
use crate::memory::static_root::analyze_memory;
|
||||
use crate::pipeline::sym::{ResourceKind, ResourceSlot, Stage};
|
||||
use crate::pipeline::testing::{
|
||||
@@ -219,7 +220,14 @@ fn emitted_entry(bitcode: &[u8], entry: &str, p: &DeviceProfile) -> (TypedModule
|
||||
};
|
||||
let spec = air::specialize(decoded, &req, &mut m).expect("specialize");
|
||||
let memory = analyze_memory(&spec, p, &mut m).expect("memory");
|
||||
let plan = select(&spec, &memory, p, &LowerInputs::new(), &mut m).expect("select");
|
||||
let plan = select(
|
||||
&spec,
|
||||
&memory,
|
||||
p,
|
||||
(&LowerInputs::new(), WidestPin::Weighed),
|
||||
&mut m,
|
||||
)
|
||||
.expect("select");
|
||||
let module = emit_module(&spec, &plan, &mut m).expect("emit").module;
|
||||
let push = plan.push.push_range.map_or(4, |(_, end)| end as usize);
|
||||
(module, push)
|
||||
|
||||
@@ -12,6 +12,7 @@ use crate::air::{self, SpecRequest};
|
||||
use crate::device::{DevicePolicy, DeviceProfile};
|
||||
use crate::lower::emit::emit_module;
|
||||
use crate::lower::select::{select, LowerInputs};
|
||||
use crate::lower::simd::WidestPin;
|
||||
use crate::memory::static_root::analyze_memory;
|
||||
use crate::pipeline::sym::{ResourceKind, ResourceSlot, Stage};
|
||||
use crate::pipeline::testing::{
|
||||
@@ -118,7 +119,14 @@ fn interpret(bitcode: &[u8], entry: &str, p: &DeviceProfile) -> u32 {
|
||||
};
|
||||
let spec = air::specialize(decoded, &req, &mut m).expect("specialize");
|
||||
let memory = analyze_memory(&spec, p, &mut m).expect("memory");
|
||||
let plan = select(&spec, &memory, p, &LowerInputs::new(), &mut m).expect("select");
|
||||
let plan = select(
|
||||
&spec,
|
||||
&memory,
|
||||
p,
|
||||
(&LowerInputs::new(), WidestPin::Weighed),
|
||||
&mut m,
|
||||
)
|
||||
.expect("select");
|
||||
let module = emit_module(&spec, &plan, &mut m).expect("emit").module;
|
||||
let bytes = [1u32, 2, 3, 4]
|
||||
.iter()
|
||||
|
||||
@@ -31,6 +31,7 @@ use crate::air::{self, SpecRequest};
|
||||
use crate::device::profile::FloatFunctions;
|
||||
use crate::lower::emit::emit_module;
|
||||
use crate::lower::select::{select, LowerInputs};
|
||||
use crate::lower::simd::WidestPin;
|
||||
use crate::memory::static_root::analyze_memory;
|
||||
use crate::pipeline::artifact::PrecisionNote;
|
||||
use crate::pipeline::sym::{ResourceKind, ResourceSlot, Stage};
|
||||
@@ -205,7 +206,14 @@ fn interpret(bitcode: &[u8], entry: &str, stem: &str) -> u32 {
|
||||
};
|
||||
let spec = air::specialize(decoded, &req, &mut m).expect("specialize");
|
||||
let memory = analyze_memory(&spec, &p, &mut m).expect("memory");
|
||||
let plan = select(&spec, &memory, &p, &LowerInputs::new(), &mut m).expect("select");
|
||||
let plan = select(
|
||||
&spec,
|
||||
&memory,
|
||||
&p,
|
||||
(&LowerInputs::new(), WidestPin::Weighed),
|
||||
&mut m,
|
||||
)
|
||||
.expect("select");
|
||||
let module = emit_module(&spec, &plan, &mut m).expect("emit").module;
|
||||
let res = Resources {
|
||||
buffers: vec![Buffer {
|
||||
|
||||
@@ -21,6 +21,7 @@ use crate::error::DriverDeviation;
|
||||
use crate::lower::arith::narrow::{controlled_modes, native_rounding, quantize_form};
|
||||
use crate::lower::emit::emit_module;
|
||||
use crate::lower::select::{select, LowerInputs};
|
||||
use crate::lower::simd::WidestPin;
|
||||
use crate::memory::static_root::analyze_memory;
|
||||
use crate::pipeline::sym::{ResourceKind, ResourceSlot, Stage};
|
||||
use crate::pipeline::testing::{
|
||||
@@ -144,7 +145,14 @@ fn interpret_bytes(bitcode: &[u8], entry: &str, p: &DeviceProfile, bytes: Vec<u8
|
||||
};
|
||||
let spec = air::specialize(decoded, &req, &mut m).expect("specialize");
|
||||
let memory = analyze_memory(&spec, p, &mut m).expect("memory");
|
||||
let plan = select(&spec, &memory, p, &LowerInputs::new(), &mut m).expect("select");
|
||||
let plan = select(
|
||||
&spec,
|
||||
&memory,
|
||||
p,
|
||||
(&LowerInputs::new(), WidestPin::Weighed),
|
||||
&mut m,
|
||||
)
|
||||
.expect("select");
|
||||
let module = emit_module(&spec, &plan, &mut m).expect("emit").module;
|
||||
let res = Resources {
|
||||
buffers: vec![Buffer {
|
||||
|
||||
@@ -18,6 +18,7 @@ use crate::device::profile::{DeviceProfile, FloatFunctions};
|
||||
use crate::device::DevicePolicy;
|
||||
use crate::lower::emit::emit_module;
|
||||
use crate::lower::select::{select, LowerInputs};
|
||||
use crate::lower::simd::WidestPin;
|
||||
use crate::memory::static_root::analyze_memory;
|
||||
use crate::pipeline::sym::{ResourceKind, ResourceSlot, Stage};
|
||||
use crate::pipeline::testing::{
|
||||
@@ -162,7 +163,14 @@ fn interpret(bitcode: &[u8], entry: &str, p: &DeviceProfile, x: [f32; 3]) -> f32
|
||||
};
|
||||
let spec = air::specialize(decoded, &req, &mut m).expect("specialize");
|
||||
let memory = analyze_memory(&spec, p, &mut m).expect("memory");
|
||||
let plan = select(&spec, &memory, p, &LowerInputs::new(), &mut m).expect("select");
|
||||
let plan = select(
|
||||
&spec,
|
||||
&memory,
|
||||
p,
|
||||
(&LowerInputs::new(), WidestPin::Weighed),
|
||||
&mut m,
|
||||
)
|
||||
.expect("select");
|
||||
let module = emit_module(&spec, &plan, &mut m).expect("emit").module;
|
||||
let bytes = [x[0], x[1], x[2], 0.0]
|
||||
.iter()
|
||||
|
||||
@@ -16,6 +16,7 @@ use crate::air::{self, SpecRequest};
|
||||
use crate::device::DevicePolicy;
|
||||
use crate::lower::emit::emit_module;
|
||||
use crate::lower::select::{select, LowerInputs};
|
||||
use crate::lower::simd::WidestPin;
|
||||
use crate::memory::static_root::analyze_memory;
|
||||
use crate::pipeline::sym::{ResourceKind, ResourceSlot, Stage};
|
||||
use crate::pipeline::testing::{
|
||||
@@ -224,7 +225,14 @@ fn interpret(bitcode: &[u8], entry: &str, p: &crate::device::DeviceProfile) -> u
|
||||
};
|
||||
let spec = air::specialize(decoded, &req, &mut m).expect("specialize");
|
||||
let memory = analyze_memory(&spec, p, &mut m).expect("memory");
|
||||
let plan = select(&spec, &memory, p, &LowerInputs::new(), &mut m).expect("select");
|
||||
let plan = select(
|
||||
&spec,
|
||||
&memory,
|
||||
p,
|
||||
(&LowerInputs::new(), WidestPin::Weighed),
|
||||
&mut m,
|
||||
)
|
||||
.expect("select");
|
||||
let module = emit_module(&spec, &plan, &mut m).expect("emit").module;
|
||||
let mut bytes = vec![0u8; 16];
|
||||
bytes[8] = 0xFF;
|
||||
|
||||
Reference in new issue
Block a user