8x8 matrix multiplication using AAM
This commit is contained in:
@@ -133,16 +133,16 @@ impl PimVM {
|
||||
|
||||
let inst = self.kernel.0[pim_unit.pc as usize];
|
||||
|
||||
let aam_grf_a_index = (address >> GRF_A_BIT_OFFSET) & 0b111;
|
||||
let aam_grf_b_index = (address >> GRF_B_BIT_OFFSET) & 0b111;
|
||||
|
||||
if pim_unit_index == 0 {
|
||||
log::debug!(
|
||||
"PimUnit {pim_unit_index} Execute PC {}: {inst:?}",
|
||||
"PimUnit {pim_unit_index} at {address:#x} (B{aam_grf_b_index}, A{aam_grf_a_index}) Execute PC {}: {inst:?}",
|
||||
pim_unit.pc
|
||||
);
|
||||
}
|
||||
|
||||
let aam_grf_a_index = (address >> GRF_A_BIT_OFFSET) & 0b111;
|
||||
let aam_grf_b_index = (address >> GRF_B_BIT_OFFSET) & 0b111;
|
||||
|
||||
match inst {
|
||||
Instruction::NOP => (),
|
||||
Instruction::EXIT => {
|
||||
@@ -244,9 +244,9 @@ impl PimVM {
|
||||
} => {
|
||||
if aam {
|
||||
src1 = if let File::GrfA { index: _ } = src1 {
|
||||
if pim_unit_index == 0 {
|
||||
log::debug!("AAM index GrfA {aam_grf_a_index}");
|
||||
}
|
||||
// if pim_unit_index == 0 {
|
||||
// log::debug!("AAM index GrfA {aam_grf_a_index}");
|
||||
// }
|
||||
File::GrfA {
|
||||
index: aam_grf_a_index as _,
|
||||
}
|
||||
@@ -255,9 +255,9 @@ impl PimVM {
|
||||
};
|
||||
|
||||
src2 = if let File::GrfB { index: _ } = src2 {
|
||||
if pim_unit_index == 0 {
|
||||
log::debug!("AAM index GrfB {aam_grf_a_index}");
|
||||
}
|
||||
// if pim_unit_index == 0 {
|
||||
// log::debug!("AAM index GrfB {aam_grf_a_index}");
|
||||
// }
|
||||
File::GrfB {
|
||||
index: aam_grf_b_index as _,
|
||||
}
|
||||
@@ -296,16 +296,16 @@ impl PimVM {
|
||||
.try_into()
|
||||
.unwrap();
|
||||
|
||||
if pim_unit_index == 0 {
|
||||
log::debug!(
|
||||
"\n{:?}\n{:?}\n{:?}\n{:?}\n{:?}",
|
||||
data0[0],
|
||||
data1[0],
|
||||
data2[0],
|
||||
product[0],
|
||||
sum[0]
|
||||
);
|
||||
}
|
||||
// if pim_unit_index == 0 {
|
||||
// log::debug!(
|
||||
// "\n{:?}\n{:?}\n{:?}\n{:?}\n{:?}",
|
||||
// data0[0],
|
||||
// data1[0],
|
||||
// data2[0],
|
||||
// product[0],
|
||||
// sum[0]
|
||||
// );
|
||||
// }
|
||||
PimVM::store(dst, pim_unit, &sum);
|
||||
}
|
||||
}
|
||||
@@ -370,9 +370,9 @@ impl PimVM {
|
||||
panic!("Unsupported dst operand: {dst:?}")
|
||||
}
|
||||
|
||||
if pim_unit_index == 0 {
|
||||
log::debug!("Store {data:?}");
|
||||
}
|
||||
// if pim_unit_index == 0 {
|
||||
// log::debug!("Store {data:?}");
|
||||
// }
|
||||
|
||||
data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user