 
 	dim3 launchDims = getReduceLaunchParams((int) extraPointers[2], hostXShapeInfo, hostZShapeInfo, funcAttributes[22], dimensionLength, sizeof(double), 1);
 
-	reduceDouble<<<launchDims.x,launchDims.y,launchDims.z, *stream>>>(
-			opNum,
-			xPointer,
-			xShapeInfoPointer,
-			extraParamsPointer,
-			resultPointer,
-			resultShapeInfoPointer,
-			dimensionPointer,
-			dimensionLength,
-			reductionPointer, deviceTADShapeInfo);
+	if (dimensionLength == 1) {
+		reduceDouble1D<<<launchDims.x,launchDims.y,launchDims.z, *stream>>>(
+				opNum,
+						xPointer,
+						xShapeInfoPointer,
+						extraParamsPointer,
+						resultPointer,
+						resultShapeInfoPointer,
+						dimensionPointer,
+						dimensionLength,
+						reductionPointer, deviceTADShapeInfo);
+	} else if (shape::rank(hostTADShapeInfo) <= 3) {
+		reduceDouble6D<<<launchDims.x,launchDims.y,launchDims.z, *stream>>>(
+				opNum,
+						xPointer,
+						xShapeInfoPointer,
+						extraParamsPointer,
+						resultPointer,
+						resultShapeInfoPointer,
+						dimensionPointer,
+						dimensionLength,
+						reductionPointer, deviceTADShapeInfo);
+	} else {
+		reduceDouble<<<launchDims.x,launchDims.y,launchDims.z, *stream>>>(
+				opNum,
+						xPointer,
+						xShapeInfoPointer,
+						extraParamsPointer,
+						resultPointer,
+						resultShapeInfoPointer,
+						dimensionPointer,
+						dimensionLength,
+						reductionPointer, deviceTADShapeInfo);
+	}
 
 	if (debug)
 		checkCudaErrors(cudaStreamSynchronize(*stream));

	if (verbose && launchDims.x == 1)
		printf("AF7 opNum:[%i]\n", opNum);

	reduceFloat1D<<<launchDims.x,launchDims.y,launchDims.z, *stream>>>(
			opNum,
			xPointer,
			xShapeInfoPointer,

						dimensionPointer,
						dimensionLength,
						reductionPointer, deviceTADShapeInfo);
	} else if (shape::rank(hostTADShapeInfo) <= 3) {
		reduceFloat6D<<<launchDims.x,launchDims.y,launchDims.z, *stream>>>(
						opNum,
						xPointer,
