242242
243243# # topk
244244
245- export MPSMatrixFindTopK, encode!, topk, topk!
245+ export MPSMatrixFindTopK, encode!
246246
247247@objcwrapper immutable= false MPSMatrixFindTopK <: MPSMatrixUnaryKernel
248248
@@ -270,7 +270,7 @@ function encode!(cmdbuf::MTLCommandBuffer, kernel::MPSMatrixFindTopK, inputMatri
270270end
271271
272272"""
273- topk!(A::MtlMatrix{T}, I::MtlMatrix{Int32}, V::MtlMatrix{T}, k)
273+ MPS. topk!(A::MtlMatrix{T}, I::MtlMatrix{Int32}, V::MtlMatrix{T}, k)
274274 where {T<:MtlFloat}
275275
276276Compute the top `k` values and their corresponding indices column-wise in a matrix `A`.
@@ -281,6 +281,9 @@ Return the indices in `I` and the values in `V`.
281281Uses `MPSMatrixFindTopK`.
282282
283283See also: [`topk`](@ref).
284+
285+ !!! warn
286+ This interface is experimental, and might change without warning.
284287"""
285288function topk! (A:: MtlMatrix{T} , I:: MtlMatrix{UInt32} , V:: MtlMatrix{T} , k) where {T<: MtlFloat }
286289 size (I,1 ) >= k || throw (ArgumentError (" Matrix 'I' must be large enough for k rows" ))
311314end
312315
313316"""
314- topk(A::MtlMatrix{T}, k) where {T<:MtlFloat}
317+ MPS. topk(A::MtlMatrix{T}, k) where {T<:MtlFloat}
315318
316319Compute the top `k` values and their corresponding indices column-wise in a matrix `A`.
317320Return the indices in `I` and the values in `V`.
@@ -321,6 +324,9 @@ Return the indices in `I` and the values in `V`.
321324Uses `MPSMatrixFindTopK`.
322325
323326See also: [`topk!`](@ref).
327+
328+ !!! warn
329+ This interface is experimental, and might change without warning.
324330"""
325331function topk (A:: MtlMatrix{T,S} , k) where {T<: MtlFloat ,S}
326332 s = (k,size (A,2 ))
0 commit comments