mirror of
https://github.com/ml-explore/mlx.git
synced 2025-06-24 17:31:16 +08:00
Fix typos (#2136)
This commit is contained in:
parent
99b9868859
commit
167b759a38
@ -356,7 +356,7 @@ class array {
|
||||
}
|
||||
|
||||
enum Status {
|
||||
// The ouptut of a computation which has not been scheduled.
|
||||
// The output of a computation which has not been scheduled.
|
||||
// For example, the status of `x` in `auto x = a + b`.
|
||||
unscheduled,
|
||||
|
||||
|
@ -10,7 +10,7 @@ For many sizes, GPU FFTs are memory bandwidth bound so
|
||||
read/write performance is important.
|
||||
|
||||
Where possible, we read 128 bits sequentially in each thread,
|
||||
coalesced with accesses from adajcent threads for optimal performance.
|
||||
coalesced with accesses from adjacent threads for optimal performance.
|
||||
|
||||
We implement specialized reading/writing for:
|
||||
- FFT
|
||||
|
@ -95,7 +95,7 @@ template <
|
||||
|
||||
Q += tidl.z * params->Q_strides[0] + // Batch
|
||||
tidl.y * params->Q_strides[1] + // Head
|
||||
tidl.x * BQ * params->Q_strides[2]; // Seqeunce
|
||||
tidl.x * BQ * params->Q_strides[2]; // Sequence
|
||||
|
||||
ulong kv_head_idx = int(tid.y) / params->gqa_factor;
|
||||
K += tidl.z * params->K_strides[0] + // Batch
|
||||
@ -106,7 +106,7 @@ template <
|
||||
|
||||
O += tidl.z * params->O_strides[0] + // Batch
|
||||
tidl.y * params->O_strides[1] + // Head
|
||||
tidl.x * BQ * params->O_strides[2]; // Seqeunce
|
||||
tidl.x * BQ * params->O_strides[2]; // Sequence
|
||||
|
||||
if (has_mask) {
|
||||
mask += tidl.z * mask_params->M_strides[0] + // Batch
|
||||
|
@ -113,7 +113,7 @@ struct BlockLoader {
|
||||
tmp_val[j] = src[(tmp_idx[j] ? i * src_ld + j : 0)];
|
||||
}
|
||||
|
||||
// Zero out uneeded values
|
||||
// Zero out unneeded values
|
||||
STEEL_PRAGMA_UNROLL
|
||||
for (short j = 0; j < vec_size; j++) {
|
||||
tmp_val[j] = tmp_idx[j] ? tmp_val[j] : T(0);
|
||||
@ -240,7 +240,7 @@ struct BlockLoaderT {
|
||||
tmp_val[j] = src[(tmp_idx[j] ? i * src_ld + j : 0)];
|
||||
}
|
||||
|
||||
// Zero out uneeded values
|
||||
// Zero out unneeded values
|
||||
STEEL_PRAGMA_UNROLL
|
||||
for (short j = 0; j < vec_size; j++) {
|
||||
tmp_val[j] = tmp_idx[j] ? tmp_val[j] : T(0);
|
||||
|
@ -141,7 +141,7 @@ implicit_gemm_conv_2d_general(
|
||||
|
||||
// Store results to device memory
|
||||
{
|
||||
// Adjust for simdgroup and thread locatio
|
||||
// Adjust for simdgroup and thread location
|
||||
int offset_m = c_row + mma_op.sm;
|
||||
int offset_n = c_col + mma_op.sn;
|
||||
C += offset_n;
|
||||
|
@ -113,7 +113,7 @@ struct BlockLoader {
|
||||
tmp_val[j] = src[(tmp_idx[j] ? i * src_ld + j : 0)];
|
||||
}
|
||||
|
||||
// Zero out uneeded values
|
||||
// Zero out unneeded values
|
||||
STEEL_PRAGMA_UNROLL
|
||||
for (short j = 0; j < vec_size; j++) {
|
||||
tmp_val[j] = tmp_idx[j] ? tmp_val[j] : T(0);
|
||||
|
@ -18,7 +18,7 @@ void Compiled::eval_cpu(
|
||||
const std::vector<array>& inputs,
|
||||
std::vector<array>& outputs) {
|
||||
throw std::runtime_error(
|
||||
"[Compiled::eval_cpu] CPU compialtion not supported on the platform.");
|
||||
"[Compiled::eval_cpu] CPU compilation not supported on the platform.");
|
||||
}
|
||||
|
||||
} // namespace mlx::core
|
||||
|
@ -569,7 +569,7 @@ inline array std(const array& a, StreamOrDevice s = {}) {
|
||||
return std(a, false, 0, to_stream(s));
|
||||
}
|
||||
|
||||
/** Computes the standard deviatoin of the elements of an array along the given
|
||||
/** Computes the standard deviation of the elements of an array along the given
|
||||
* axes */
|
||||
array std(
|
||||
const array& a,
|
||||
|
@ -223,7 +223,7 @@ array multivariate_normal(
|
||||
|
||||
auto n = mean.shape(-1);
|
||||
|
||||
// Check shapes comatibility of mean and cov
|
||||
// Check shapes compatibility of mean and cov
|
||||
if (cov.shape(-1) != cov.shape(-2)) {
|
||||
throw std::invalid_argument(
|
||||
"[multivariate_normal] last two dimensions of cov must be equal.");
|
||||
@ -402,7 +402,7 @@ array categorical(
|
||||
if (broadcast_shapes(shape, reduced_shape) != shape) {
|
||||
std::ostringstream msg;
|
||||
msg << "[categorical] Requested shape " << shape
|
||||
<< " is not broadcast compatable with reduced logits shape"
|
||||
<< " is not broadcast compatible with reduced logits shape"
|
||||
<< reduced_shape << ".";
|
||||
throw std::invalid_argument(msg.str());
|
||||
}
|
||||
|
@ -422,7 +422,7 @@ void init_random(nb::module_& parent_module) {
|
||||
axis (int, optional): The axis which specifies the distribution.
|
||||
Default: ``-1``.
|
||||
shape (list(int), optional): The shape of the output. This must
|
||||
be broadcast compatable with ``logits.shape`` with the ``axis``
|
||||
be broadcast compatible with ``logits.shape`` with the ``axis``
|
||||
dimension removed. Default: ``None``
|
||||
num_samples (int, optional): The number of samples to draw from each
|
||||
of the categorical distributions in ``logits``. The output will have
|
||||
|
Loading…
Reference in New Issue
Block a user