pub struct HipServer { /* private fields */ }Trait Implementations§
Source§impl ComputeServer for HipServer
impl ComputeServer for HipServer
Source§type Kernel = Box<dyn CubeTask<CppCompiler<HipDialect<WmmaIntrinsicCompiler>>>>
type Kernel = Box<dyn CubeTask<CppCompiler<HipDialect<WmmaIntrinsicCompiler>>>>
The kernel type defines the computation algorithms.
Source§type Storage = GpuStorage
type Storage = GpuStorage
The storage type defines how data is stored and accessed.
Source§type MemoryLayoutPolicy = PitchedMemoryLayoutPolicy
type MemoryLayoutPolicy = PitchedMemoryLayoutPolicy
Manages how allocations are performed for a server.
Source§fn logger(&self) -> Arc<ServerLogger>
fn logger(&self) -> Arc<ServerLogger>
Retrieve the server logger.
Source§fn utilities(&self) -> Arc<ServerUtilities<Self>>
fn utilities(&self) -> Arc<ServerUtilities<Self>>
Retrieve the server utilities.
Source§fn staging(
&mut self,
sizes: &[usize],
stream_id: StreamId,
) -> Result<Vec<Bytes>, ServerError>
fn staging( &mut self, sizes: &[usize], stream_id: StreamId, ) -> Result<Vec<Bytes>, ServerError>
Reserves N Bytes of the provided sizes to be used as staging to load data.
Source§fn initialize_memory(
&mut self,
memory: ManagedMemoryHandle,
size: u64,
stream_id: StreamId,
)
fn initialize_memory( &mut self, memory: ManagedMemoryHandle, size: u64, stream_id: StreamId, )
Source§fn read(
&mut self,
descriptors: Vec<CopyDescriptor>,
stream_id: StreamId,
) -> DynFut<Result<Vec<Bytes>, ServerError>>
fn read( &mut self, descriptors: Vec<CopyDescriptor>, stream_id: StreamId, ) -> DynFut<Result<Vec<Bytes>, ServerError>>
Given bindings, returns the owned resources as bytes.
Source§fn write(
&mut self,
descriptors: Vec<(CopyDescriptor, Bytes)>,
stream_id: StreamId,
)
fn write( &mut self, descriptors: Vec<(CopyDescriptor, Bytes)>, stream_id: StreamId, )
Writes the specified bytes into the buffers given
Source§unsafe fn launch(
&mut self,
kernel: Self::Kernel,
count: CubeCount,
bindings: KernelArguments,
mode: ExecutionMode,
stream_id: StreamId,
)
unsafe fn launch( &mut self, kernel: Self::Kernel, count: CubeCount, bindings: KernelArguments, mode: ExecutionMode, stream_id: StreamId, )
Source§fn flush(&mut self, stream_id: StreamId) -> Result<(), ServerError>
fn flush(&mut self, stream_id: StreamId) -> Result<(), ServerError>
Flush all outstanding tasks in the server.
Source§fn sync(&mut self, stream_id: StreamId) -> DynFut<Result<(), ServerError>>
fn sync(&mut self, stream_id: StreamId) -> DynFut<Result<(), ServerError>>
Wait for the completion of every task in the server.
Source§fn start_profile(
&mut self,
stream_id: StreamId,
) -> Result<ProfilingToken, ServerError>
fn start_profile( &mut self, stream_id: StreamId, ) -> Result<ProfilingToken, ServerError>
Enable collecting timestamps.
Source§fn end_profile(
&mut self,
stream_id: StreamId,
token: ProfilingToken,
) -> Result<ProfileDuration, ProfileError>
fn end_profile( &mut self, stream_id: StreamId, token: ProfilingToken, ) -> Result<ProfileDuration, ProfileError>
Disable collecting timestamps.
Source§fn get_resource(
&mut self,
binding: Binding,
stream_id: StreamId,
) -> Result<ManagedResource<GpuResource>, ServerError>
fn get_resource( &mut self, binding: Binding, stream_id: StreamId, ) -> Result<ManagedResource<GpuResource>, ServerError>
Given a resource handle, returns the storage resource.
Source§fn memory_usage(
&mut self,
stream_id: StreamId,
) -> Result<MemoryUsage, ServerError>
fn memory_usage( &mut self, stream_id: StreamId, ) -> Result<MemoryUsage, ServerError>
The current memory usage of the server.
Source§fn memory_cleanup(&mut self, stream_id: StreamId)
fn memory_cleanup(&mut self, stream_id: StreamId)
Ask the server to release memory that it can release.
Source§fn allocation_mode(&mut self, mode: MemoryAllocationMode, stream_id: StreamId)
fn allocation_mode(&mut self, mode: MemoryAllocationMode, stream_id: StreamId)
Update the memory mode of allocation in the server.
Source§impl DeviceService for HipServer
impl DeviceService for HipServer
Source§impl ServerCommunication for HipServer
impl ServerCommunication for HipServer
Source§const SERVER_COMM_ENABLED: bool = false
const SERVER_COMM_ENABLED: bool = false
Indicates whether server-to-server communication is enabled for this implementation.
Source§fn sync_collective(&mut self, stream_id: StreamId) -> Result<(), ServerError>
fn sync_collective(&mut self, stream_id: StreamId) -> Result<(), ServerError>
Ensure that all queued collective operations have been executed. Read more
Source§fn comm_init(&mut self, device_ids: Vec<DeviceId>) -> Result<(), ServerError>
fn comm_init(&mut self, device_ids: Vec<DeviceId>) -> Result<(), ServerError>
Initialize the communication between the devices in
device_ids. Read moreSource§fn all_reduce(
&mut self,
src: Binding,
dst: Binding,
dtype: ElemType,
stream_id: StreamId,
op: ReduceOperation,
device_ids: Vec<DeviceId>,
) -> Result<(), ServerError>
fn all_reduce( &mut self, src: Binding, dst: Binding, dtype: ElemType, stream_id: StreamId, op: ReduceOperation, device_ids: Vec<DeviceId>, ) -> Result<(), ServerError>
Performs an
all_reduce operation on the input data and writes it to the output buffer.
see https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/usage/collectives.html#allreduce Read moreimpl Send for HipServer
Auto Trait Implementations§
impl !Freeze for HipServer
impl !RefUnwindSafe for HipServer
impl !Sync for HipServer
impl Unpin for HipServer
impl UnsafeUnpin for HipServer
impl !UnwindSafe for HipServer
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more