     size_t reduce_block_size = 256;
     size_t reduce_buff_size = rounduptomult(num_vec, reduce_block_size);
     size_t ones_size = std::max(num_vec_aligned, dim_aligned);
-    size_t cache_size_mb = 50;
+    size_t cache_size_mb = 200;
     size_t cache_rows = cache_size_mb * 1024 * 1024 / (num_vec_aligned * sizeof(float));
     cache_rows = std::min(cache_rows, num_vec);
 

        KCacheRemapIdx[i] = last;
        KCacheVecIdx[last] = i;
    }
    //calculate cache matrix row [last], original index is [i]
    extern __shared__ float xi[];
    int idxshift = 0;

    alpha[j] -= l * y[j];
}

__global__ void kernelCheckCache(const int * i_ptr, float * K, int * KCacheRemapIdx, int * KCacheVecIdx, int cache_rows, const float * x, const float * xT, float gamma, int num_vec, int num_vec_aligned, int dim, int dim_aligned, int lastPtrIdx)
{
    int i = *i_ptr;
    if (KCacheRemapIdx[i] >= 0)
