 
     name += trans;
 
-    if ( (trans == "tn" && m % 8 == 0  && n % 8 == 0) ||
-         (trans == "nn" && k % 16 == 0 && n % 8 == 0) ||
-         (trans == "nt" && k % 16 == 0)) {
+    int sizeA, sizeB, threads;
+
+    std::tie(sizeA, sizeB, threads) = get_grid_dimensions(grid, m, n, sm_count, trans);
+
+    int k_vec = (sizeA == 32 || sizeB == 32) ? 4 : 16;
+
+    if ( (trans == "tn" && m % 8 == 0 && n % 8 == 0) ||
+         (trans == "nn" && k % k_vec == 0 && n % 8 == 0) ||
+         (trans == "nt" && k % k_vec == 0)) {
          name += "_vec";
     }
-
-    int sizeA, sizeB, threads;
-
-    std::tie(sizeA, sizeB, threads) = get_grid_dimensions(grid, m, n, sm_count, trans);
 
     int gridA = m / sizeA + (m % sizeA != 0);
     int gridB = n / sizeB + (n % sizeB != 0);

                    int sh64 = sh / 64;
                    int wide = max(m, n);
                    sh64 *= (wide / 128 + (wide % 128 != 0)) / sm_count;
                    if (sh64 > 1 || trans == "tn") {
                        size = 64;
                    }
                    else {

            size = 128;
        }

        if (m >= n) {
            if (trans == "nt") {
                size = 128;
            }
