octoJon commented on code in PR #12284:
URL: https://github.com/apache/tvm/pull/12284#discussion_r936912646


##########
python/tvm/topi/random/kernel.py:
##########
@@ -602,3 +602,57 @@ def normal(gen, mean, scale, out_shape, out_dtype):
     )
 
     return new_gen, random_values
+
+
+def multinomial(gen, probs, num_samples):
+    """Draw samples from a multinomial distribution defined by the input 
tensor.
+
+    Parameters
+    ----------
+    gen : ThreefryKey
+        Generator state. Can be create with :py:func:`tvm.relay.threefry_key`. 
This should not be
+        reused in another function, otherwise random numbers will be repeated.
+
+    probs: Tensor[(input_rows, indices), float]
+        A tensor containing the probabilities to sample from. Each value 
represents the
+        probability of choosing its corresonding index. If a tensor is 
provided, the last dimension

Review Comment:
   Nit: "corresonding" -> "corresponding"



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to