Cuda.DeviceManaging a CUDA GPU device and its primary context. See: Device Management and Primary Context Management.
See CUdevice.
val sexp_of_t : t -> Sexplib0.Sexp.tReturns the number of Nvidia devices. See cuDeviceGetCount.
val get : ordinal:int -> tReturns the given device. See cuDeviceGet.
val primary_ctx_reset : t -> unitDestroys all allocations and resets all state on the primary context. See cuDevicePrimaryCtxReset.
Gets the free memory on the device of the current context according to the OS, and the total memory on the device. See: cuMemGetInfo.
val sexp_of_p2p_attribute : p2p_attribute -> Sexplib0.Sexp.tval get_p2p_attributes : dst:t -> src:t -> p2p_attribute listSee CUcomputemode.
val sexp_of_computemode : computemode -> Sexplib0.Sexp.tval sexp_of_flush_GPU_direct_RDMA_writes_options :
flush_GPU_direct_RDMA_writes_options ->
Sexplib0.Sexp.tval sexp_of_mem_allocation_handle_type :
mem_allocation_handle_type ->
Sexplib0.Sexp.ttype attributes = {name : string;max_threads_per_block : int;max_block_dim_x : int;max_block_dim_y : int;max_block_dim_z : int;max_grid_dim_x : int;max_grid_dim_y : int;max_grid_dim_z : int;total_constant_memory : int;In bytes.
*)warp_size : int;In threads.
*)max_pitch : int;In bytes.
*)max_registers_per_block : int;32-bit registers.
*)clock_rate : int;In kilohertz.
*)texture_alignment : int;multiprocessor_count : int;kernel_exec_timeout : bool;integrated : bool;can_map_host_memory : bool;compute_mode : computemode;maximum_texture1d_width : int;maximum_texture2d_width : int;maximum_texture2d_height : int;maximum_texture3d_width : int;maximum_texture3d_height : int;maximum_texture3d_depth : int;maximum_texture2d_layered_width : int;maximum_texture2d_layered_height : int;maximum_texture2d_layered_layers : int;surface_alignment : int;concurrent_kernels : bool;Whether the device supports executing multiple kernels within the same context simultaneously.
*)ecc_enabled : bool;Whether error correction is supported and enabled on the device.
*)pci_bus_id : int;pci_device_id : int;PCI device (also known as slot) identifier of the device.
*)tcc_driver : bool;memory_clock_rate : int;In kilohertz.
*)global_memory_bus_width : int;In bits.
*)l2_cache_size : int;In bytes.
*)max_threads_per_multiprocessor : int;async_engine_count : int;unified_addressing : bool;maximum_texture1d_layered_width : int;maximum_texture1d_layered_layers : int;maximum_texture2d_gather_width : int;maximum_texture2d_gather_height : int;maximum_texture3d_width_alternate : int;maximum_texture3d_height_alternate : int;maximum_texture3d_depth_alternate : int;pci_domain_id : int;texture_pitch_alignment : int;maximum_texturecubemap_width : int;maximum_texturecubemap_layered_width : int;maximum_texturecubemap_layered_layers : int;maximum_surface1d_width : int;maximum_surface2d_width : int;maximum_surface2d_height : int;maximum_surface3d_width : int;maximum_surface3d_height : int;maximum_surface3d_depth : int;maximum_surface1d_layered_width : int;maximum_surface1d_layered_layers : int;maximum_surface2d_layered_width : int;maximum_surface2d_layered_height : int;maximum_surface2d_layered_layers : int;maximum_surfacecubemap_width : int;maximum_surfacecubemap_layered_width : int;maximum_surfacecubemap_layered_layers : int;maximum_texture2d_linear_width : int;maximum_texture2d_linear_height : int;maximum_texture2d_linear_pitch : int;In bytes.
*)maximum_texture2d_mipmapped_width : int;maximum_texture2d_mipmapped_height : int;compute_capability_major : int;compute_capability_minor : int;maximum_texture1d_mipmapped_width : int;stream_priorities_supported : bool;global_l1_cache_supported : bool;local_l1_cache_supported : bool;max_registers_per_multiprocessor : int;32-bit registers.
*)managed_memory : bool;multi_gpu_board : bool;multi_gpu_board_group_id : int;host_native_atomic_supported : bool;single_to_double_precision_perf_ratio : int;pageable_memory_access : bool;Device supports coherently accessing pageable memory without calling cudaHostRegister.
*)concurrent_managed_access : bool;compute_preemption_supported : bool;can_use_host_pointer_for_registered_mem : bool;cooperative_launch : bool;can_flush_remote_writes : bool;host_register_supported : bool;pageable_memory_access_uses_host_page_tables : bool;direct_managed_mem_access_from_host : bool;virtual_memory_management_supported : bool;handle_type_posix_file_descriptor_supported : bool;handle_type_win32_handle_supported : bool;handle_type_win32_kmt_handle_supported : bool;max_blocks_per_multiprocessor : int;generic_compression_supported : bool;max_persisting_l2_cache_size : int;In bytes.
*)max_access_policy_window_size : int;For CUaccessPolicyWindow::num_bytes.
gpu_direct_rdma_with_cuda_vmm_supported : bool;sparse_cuda_array_supported : bool;read_only_host_register_supported : bool;timeline_semaphore_interop_supported : bool;memory_pools_supported : bool;gpu_direct_rdma_supported : bool;gpu_direct_rdma_flush_writes_options : flush_GPU_direct_RDMA_writes_options
list;gpu_direct_rdma_writes_ordering : bool;mempool_supported_handle_types : mem_allocation_handle_type list;Handle types supported with mempool based IPC.
*)cluster_launch : bool;deferred_mapping_cuda_array_supported : bool;can_use_64_bit_stream_mem_ops : bool;can_use_stream_wait_value_nor : bool;dma_buf_supported : bool;ipc_event_supported : bool;mem_sync_domain_count : int;Number of memory domains the device supports.
*)tensor_map_access_supported : bool;unified_function_pointers : bool;multicast_supported : bool;Device supports switch multicast and reduction operations.
*)}See cuDeviceGetAttribute.
val sexp_of_attributes : attributes -> Sexplib0.Sexp.tval get_attributes : t -> attributesPopulates all the device attributes. See cuDeviceGetAttribute.