Skip to content

Commit

Permalink
finally
Browse files Browse the repository at this point in the history
  • Loading branch information
Qazalin committed Jun 28, 2024
1 parent e2736d4 commit d6b46ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub extern "C" fn run_asm(
ly: u32,
lz: u32,
args_ptr: *const u64,
) -> usize {
) -> i32 {
let kernel = match *OSX {
true => {
let mut lib_bytes: Vec<u8> = Vec::with_capacity(lib_sz as usize);
Expand Down
2 changes: 1 addition & 1 deletion src/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ impl<'a> Thread<'a> {
let (x, y, z) =
(f16::from_bits(x), f16::from_bits(y), f16::from_bits(z));
let ret = match op {
14 => Ok::<f16, Result<(), usize>>(f16::mul_add(x, y, z)),
14 => Ok::<f16, i32>(f16::mul_add(x, y, z)),
15 => Ok(x + y),
16 => Ok(x * y),
17 => Ok(f16::min(x, y)),
Expand Down
6 changes: 3 additions & 3 deletions src/work_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl<'a> WorkGroup<'a> {
};
}

pub fn exec_waves(&mut self) -> Result<(), usize> {
pub fn exec_waves(&mut self) -> Result<(), i32> {
let mut blocks = vec![];
for z in 0..self.launch_bounds[2] {
for y in 0..self.launch_bounds[1] {
Expand Down Expand Up @@ -78,7 +78,7 @@ impl<'a> WorkGroup<'a> {
Ok(())
}

fn exec_wave(&mut self, (wave_id, threads): (usize, &Vec<[u32; 3]>)) -> Result<(), usize> {
fn exec_wave(&mut self, (wave_id, threads): (usize, &Vec<[u32; 3]>)) -> Result<(), i32> {
let wave_state = self.wave_state.get(&wave_id);
let mut sds = match wave_state {
Some(val) => val.6.clone(),
Expand Down Expand Up @@ -169,7 +169,7 @@ impl<'a> WorkGroup<'a> {
simm: None,
sgpr_co: &mut sgpr_co,
};
let ret = thread.interpret()?;
thread.interpret()?;
if thread.scalar {
pc = ((pc as isize) + 1 + (thread.pc_offset as isize)) as usize;
break;
Expand Down

0 comments on commit d6b46ba

Please sign in to comment.