MLX
Loading...
Searching...
No Matches
defines.h
Go to the documentation of this file.
1// Copyright © 2023 Apple Inc.
2
3#pragma once
4
5#ifdef __METAL__
6#define MTL_CONST constant
7#else
8#define MTL_CONST
9#endif
10
11static MTL_CONST constexpr int MAX_BINARY_SPECIALIZED_DIMS = 5;
12static MTL_CONST constexpr int MAX_COPY_SPECIALIZED_DIMS = 5;
13static MTL_CONST constexpr int MAX_REDUCE_SPECIALIZED_DIMS = 4;
14static MTL_CONST constexpr int REDUCE_N_READS = 16;
15static MTL_CONST constexpr int SOFTMAX_N_READS = 4;
16static MTL_CONST constexpr int SOFTMAX_LOOPED_LIMIT = 4096;
17static MTL_CONST constexpr int RMS_N_READS = 4;
18static MTL_CONST constexpr int RMS_LOOPED_LIMIT = 4096;
static constexpr int MAX_COPY_SPECIALIZED_DIMS
Definition defines.h:12
static constexpr int MAX_REDUCE_SPECIALIZED_DIMS
Definition defines.h:13
static constexpr int REDUCE_N_READS
Definition defines.h:14
static constexpr int RMS_LOOPED_LIMIT
Definition defines.h:18
static constexpr int SOFTMAX_N_READS
Definition defines.h:15
#define MTL_CONST
Definition defines.h:8
static constexpr int RMS_N_READS
Definition defines.h:17
static constexpr int SOFTMAX_LOOPED_LIMIT
Definition defines.h:16
static constexpr int MAX_BINARY_SPECIALIZED_DIMS
Definition defines.h:11