mirror of
https://github.com/tig-foundation/tig-monorepo.git
synced 2026-02-21 10:27:49 +08:00
Only use GPU fuel & signature.
Some checks are pending
Test Workspace / Test Workspace (push) Waiting to run
Some checks are pending
Test Workspace / Test Workspace (push) Waiting to run
This commit is contained in:
parent
4efbbff743
commit
c0dcd72274
@ -230,16 +230,21 @@ pub fn compute_solution(
|
||||
if stream.memcpy_dtov(&error_stat)?[0] != 0 {
|
||||
break 'out_of_fuel (max_fuel + 1, 0, Solution::new(), None);
|
||||
}
|
||||
let fuel_consumed = (stream.memcpy_dtov(&fuel_usage)?[0] / gpu_fuel_scale
|
||||
+ max_fuel
|
||||
- unsafe { **library.get::<*const u64>(b"__fuel_remaining")? });
|
||||
let gpu_fuel_consumed = stream.memcpy_dtov(&fuel_usage)?[0] / gpu_fuel_scale;
|
||||
// let cpu_fuel_consumed =
|
||||
// max_fuel - unsafe { **library.get::<*const u64>(b"__fuel_remaining")? };
|
||||
// let fuel_consumed = gpu_fuel_consumed + cpu_fuel_consumed;
|
||||
let fuel_consumed = gpu_fuel_consumed;
|
||||
|
||||
if fuel_consumed > max_fuel {
|
||||
break 'out_of_fuel (max_fuel + 1, 0, Solution::new(), None);
|
||||
}
|
||||
|
||||
let runtime_signature = (stream.memcpy_dtov(&signature)?[0]
|
||||
^ unsafe { **library.get::<*const u64>(b"__runtime_signature")? });
|
||||
let gpu_runtime_signature = stream.memcpy_dtov(&signature)?[0];
|
||||
// let cpu_runtime_signature =
|
||||
// unsafe { **library.get::<*const u64>(b"__runtime_signature")? };
|
||||
// let runtime_signature = gpu_runtime_signature ^ cpu_runtime_signature;
|
||||
let runtime_signature = gpu_runtime_signature;
|
||||
|
||||
let (solution, invalid_reason) = match result {
|
||||
Some(s) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user