Remove unused variables (#706)

This commit is contained in:
Jack Mousseau 2024-02-18 12:50:10 -08:00 committed by GitHub
parent dc937b8ed3
commit 0925af43b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 0 additions and 11 deletions

View File

@ -24,8 +24,6 @@ void _qmm_t_4_64(
constexpr int bitmask = (1 << bits) - 1;
constexpr int pack_factor = 32 / bits;
constexpr int packs_in_group = group_size / pack_factor;
const int Kg = K / group_size;
const int Kw = K / pack_factor;
for (int m = 0; m < M; m++) {
const uint32_t* w_local = w;

View File

@ -410,7 +410,6 @@ void Compiled::eval_cpu(
// Get the kernel name from the lib
int ndim = shape.size();
bool dynamic = ndim >= 8;
auto kernel_name = kernel_lib_ + (contiguous ? "_contiguous" : "_strided_");
if (!contiguous) {
kernel_name += std::to_string(shape.size());

View File

@ -182,7 +182,6 @@ void implicit_gemm_conv_2D_gpu(
int implicit_M = conv_params.N * conv_params.oS[0] * conv_params.oS[1];
int implicit_N = conv_params.O;
int implicit_K = conv_params.wS[0] * conv_params.wS[1] * conv_params.C;
size_t grid_dim_x = (implicit_N + bn - 1) / bn;
size_t grid_dim_y = (implicit_M + bm - 1) / bm;

View File

@ -167,10 +167,6 @@ void Scatter::eval_gpu(const std::vector<array>& inputs, array& out) {
auto& upd = inputs.back();
size_t nthreads = upd.size();
NS::UInteger thread_group_size = kernel->maxTotalThreadsPerThreadgroup();
if (thread_group_size > nthreads) {
thread_group_size = nthreads;
}
compute_encoder->setComputePipelineState(kernel);

View File

@ -691,7 +691,6 @@ void RandomBits::eval_gpu(const std::vector<array>& inputs, array& out) {
// organize into grid nkeys x elem_per_key
MTL::Size grid_dims = MTL::Size(num_keys, half_size + odd, 1);
NS::UInteger thread_group_size = kernel->maxTotalThreadsPerThreadgroup();
auto nthreads = std::min(num_keys * (half_size + odd), thread_group_size);
MTL::Size group_dims = MTL::Size(thread_group_size, 1, 1);
auto compute_encoder = d.get_command_encoder(s.index);
compute_encoder->setComputePipelineState(kernel);

View File

@ -114,7 +114,6 @@ void gguf_load_quantized(
<< "has incompatible last dim shape: " << shape[shape.size() - 1];
throw std::runtime_error(msg.str());
}
const uint64_t num_blocks = tensor.num_weights / weights_per_block;
std::vector<int> weights_shape = shape;
weights_shape.back() /= (weights_per_byte * 4);

View File

@ -628,7 +628,6 @@ std::vector<array> Convolution::vjp(
auto& wt = primals[1];
auto cotan = cotangents[0];
int N = in.shape(0);
int O = wt.shape(0);
// Resolve Padded input shapes and strides