Mojo function
device_sampling_from_prob
device_sampling_from_prob[vec_size: Int, block_size: Int, dtype: DType, deterministic: Bool = False](i: Int, d: Int, low: Float64, u: Float32, prob_vec: SIMD[DType.float32, vec_size], aggregate: Float32, sampled_id_sram: LegacyUnsafePointer[Int, address_space=AddressSpace.SHARED], last_valid_id_sram: LegacyUnsafePointer[Int, address_space=AddressSpace.SHARED]) -> Float32
Device-level sampling from probability distribution with atomic operations.
Returns:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!