pub struct Runtime { /* private fields */ }Expand description
SoftGPU runtime state.
Implementations§
Source§impl Runtime
impl Runtime
pub fn new(profile: DeviceProfile) -> Result<Self, Error>
Sourcepub fn dispatch_captures(&self) -> &[DispatchDescriptor]
pub fn dispatch_captures(&self) -> &[DispatchDescriptor]
Owned packet captures suitable for offline aql::replay_dispatch.
pub fn profile(&self) -> &DeviceProfile
pub fn trace_snapshot(&self) -> Vec<TraceEvent>
pub fn init(&mut self) -> Result<(), RuntimeError>
pub fn shut_down(&mut self) -> Result<(), RuntimeError>
pub fn is_initialized(&self) -> bool
pub fn iterate_agents<F>(&self, callback: F) -> Result<(), RuntimeError>
pub fn agent_get_info( &self, handle: PackedHandle, attr: AgentInfoAttr, ) -> Result<AgentInfoValue, RuntimeError>
pub fn iterate_regions<F>( &self, agent: PackedHandle, callback: F, ) -> Result<(), RuntimeError>
pub fn iterate_pools<F>( &self, agent: PackedHandle, callback: F, ) -> Result<(), RuntimeError>
pub fn region_get_info( &self, handle: PackedHandle, attr: RegionInfoAttr, ) -> Result<RegionInfoValue, RuntimeError>
pub fn pool_get_info( &self, handle: PackedHandle, attr: PoolInfoAttr, ) -> Result<PoolInfoValue, RuntimeError>
pub fn memory_allocate( &mut self, space_handle: PackedHandle, size: usize, ) -> Result<*mut u8, RuntimeError>
pub fn memory_free(&mut self, ptr: *mut u8) -> Result<(), RuntimeError>
pub fn allocation_lookup( &self, ptr: *const u8, ) -> Result<AllocationMeta, RuntimeError>
Sourcepub unsafe fn memory_copy(
&self,
dst: *mut u8,
src: *const u8,
size: usize,
) -> Result<(), RuntimeError>
pub unsafe fn memory_copy( &self, dst: *mut u8, src: *const u8, size: usize, ) -> Result<(), RuntimeError>
§Safety
dst and src must be valid for size bytes; SoftGPU does not
validate OS-mapped pointers beyond SoftGPU allocations.
pub fn agents_allow_access( &self, agents: &[PackedHandle], _ptr: *const u8, ) -> Result<(), RuntimeError>
pub fn agent_memory_pool_access( &self, agent: PackedHandle, pool: PackedHandle, ) -> Result<u32, RuntimeError>
pub fn signal_create( &mut self, initial: i64, ) -> Result<PackedHandle, RuntimeError>
pub fn signal_destroy( &mut self, handle: PackedHandle, ) -> Result<(), RuntimeError>
pub fn signal_load(&self, handle: PackedHandle) -> Result<i64, RuntimeError>
pub fn signal_store( &mut self, handle: PackedHandle, value: i64, ) -> Result<(), RuntimeError>
Sourcepub fn signal_arc(
&self,
handle: PackedHandle,
) -> Result<Arc<SoftGpuSignal>, RuntimeError>
pub fn signal_arc( &self, handle: PackedHandle, ) -> Result<Arc<SoftGpuSignal>, RuntimeError>
Clone the signal Arc for waiting without holding the runtime lock.
pub fn signal_wait( &self, handle: PackedHandle, condition: u32, compare: i64, timeout_hint_ns: u64, wait_state_hint: u32, ) -> Result<SignalWaitOutcome, RuntimeError>
Sourcepub fn queue_observe(
&self,
abi: *const HsaQueueAbi,
) -> Result<Vec<PacketObservation>, RuntimeError>
pub fn queue_observe( &self, abi: *const HsaQueueAbi, ) -> Result<Vec<PacketObservation>, RuntimeError>
SoftGPU packet observation without doorbell (test / tooling).
pub fn queue_create( &mut self, agent: PackedHandle, size: u32, type_: u32, ) -> Result<*mut HsaQueueAbi, RuntimeError>
pub fn queue_destroy( &mut self, abi: *mut HsaQueueAbi, ) -> Result<(), RuntimeError>
pub fn queue_load_write_index( &self, abi: *const HsaQueueAbi, ) -> Result<u64, RuntimeError>
pub fn queue_load_read_index( &self, abi: *const HsaQueueAbi, ) -> Result<u64, RuntimeError>
pub fn queue_store_write_index( &self, abi: *const HsaQueueAbi, value: u64, ) -> Result<(), RuntimeError>
pub fn queue_store_read_index( &self, abi: *const HsaQueueAbi, value: u64, ) -> Result<(), RuntimeError>
pub fn queue_doorbell_count( &self, abi: *const HsaQueueAbi, ) -> Result<u64, RuntimeError>
pub fn record_unsupported(&self, api: &str, detail: &str)
pub fn max_fidelity(&self) -> FidelityLevel
Auto Trait Implementations§
impl !Freeze for Runtime
impl !Sync for Runtime
impl RefUnwindSafe for Runtime
impl Send for Runtime
impl Unpin for Runtime
impl UnsafeUnpin for Runtime
impl UnwindSafe for Runtime
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more