Skip to content

Commit 3ba8a1b

Browse files
committed
Remove Java17Parts
1 parent f425b39 commit 3ba8a1b

File tree

5 files changed

+74
-179
lines changed

5 files changed

+74
-179
lines changed

bin/systemds

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,6 @@ if [ $WORKER == 1 ]; then
413413
print_out "# starting Federated worker on port $PORT"
414414
CMD=" \
415415
java $SYSTEMDS_STANDALONE_OPTS \
416-
--add-modules=jdk.incubator.vector \
417416
$LOG4JPROPFULL \
418417
-jar $SYSTEMDS_JAR_FILE \
419418
-w $PORT \
@@ -423,7 +422,6 @@ elif [ "$FEDMONITORING" == 1 ]; then
423422
print_out "# starting Federated backend monitoring on port $PORT"
424423
CMD=" \
425424
java $SYSTEMDS_STANDALONE_OPTS \
426-
--add-modules=jdk.incubator.vector \
427425
$LOG4JPROPFULL \
428426
-jar $SYSTEMDS_JAR_FILE \
429427
-fedMonitoring $PORT \
@@ -435,7 +433,6 @@ elif [ $SYSDS_DISTRIBUTED == 0 ]; then
435433
CMD=" \
436434
java $SYSTEMDS_STANDALONE_OPTS \
437435
$LOG4JPROPFULL \
438-
--add-modules=jdk.incubator.vector \
439436
-jar $SYSTEMDS_JAR_FILE \
440437
-f $SCRIPT_FILE \
441438
-exec $SYSDS_EXEC_MODE \
@@ -445,7 +442,6 @@ else
445442
print_out "# Running script $SCRIPT_FILE distributed with opts: $*"
446443
CMD=" \
447444
spark-submit $SYSTEMDS_DISTRIBUTED_OPTS \
448-
--add-modules=jdk.incubator.vector \
449445
$SYSTEMDS_JAR_FILE \
450446
-f $SCRIPT_FILE \
451447
-exec $SYSDS_EXEC_MODE \

pom.xml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
<!-- aws-java-sdk-bundle version should align with hadoop-aws version -->
6868
<!-- aws-java-sdk-bundle.version>1.12.367</aws-java-sdk-bundle.version -->
6969
<!-- Set java compile level via argument, ex: 1.8 1.9 10 11-->
70-
<java.level>17</java.level>
70+
<java.level>11</java.level>
7171
<java.version>{java.level}</java.version>
7272
<!-->Testing settings<!-->
7373
<maven.test.skip>false</maven.test.skip>
@@ -77,7 +77,6 @@
7777
<test-forkCount>1C</test-forkCount>
7878
<rerun.failing.tests.count>2</rerun.failing.tests.count>
7979
<jacoco.skip>false</jacoco.skip>
80-
<doc.skip>false</doc.skip>
8180
<jacoco.include>**</jacoco.include>
8281
<automatedtestbase.outputbuffering>false</automatedtestbase.outputbuffering>
8382
<argLine>-Xms3000m -Xmx3000m -Xmn300m</argLine>
@@ -346,9 +345,6 @@
346345
<source>${java.level}</source>
347346
<target>${java.level}</target>
348347
<release>${java.level}</release>
349-
<compilerArgs>
350-
<arg>--add-modules=jdk.incubator.vector</arg>
351-
</compilerArgs>
352348
</configuration>
353349
</plugin>
354350

@@ -371,7 +367,6 @@
371367
<systemPropertyVariables>
372368
<log4j.configurationFile>file:src/test/resources/log4j.properties</log4j.configurationFile>
373369
</systemPropertyVariables>
374-
<argLine>--add-modules=jdk.incubator.vector</argLine>
375370
</configuration>
376371
</plugin>
377372

@@ -880,10 +875,9 @@
880875
<configuration>
881876
<excludePackageNames>*.protobuf</excludePackageNames>
882877
<notimestamp>true</notimestamp>
883-
<failOnWarnings>false</failOnWarnings>
878+
<failOnWarnings>true</failOnWarnings>
884879
<quiet>true</quiet>
885-
<additionalJOption>--add-modules=jdk.incubator.vector</additionalJOption>
886-
<skip>${doc.skip}</skip>
880+
<skip>false</skip>
887881
<show>public</show>
888882
<source>${java.level}</source>
889883
</configuration>

src/main/java/org/apache/sysds/runtime/compress/colgroup/ColGroupDDC.java

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
import java.util.List;
2727
import java.util.concurrent.ExecutorService;
2828

29-
import jdk.incubator.vector.DoubleVector;
30-
import jdk.incubator.vector.VectorSpecies;
29+
// import jdk.incubator.vector.DoubleVector;
30+
// import jdk.incubator.vector.VectorSpecies;
3131
import org.apache.commons.lang3.NotImplementedException;
3232
import org.apache.sysds.runtime.DMLRuntimeException;
3333
import org.apache.sysds.runtime.compress.CompressedMatrixBlock;
@@ -75,7 +75,7 @@ public class ColGroupDDC extends APreAgg implements IMapToDataGroup {
7575

7676
protected final AMapToData _data;
7777

78-
static final VectorSpecies<Double> SPECIES = DoubleVector.SPECIES_PREFERRED;
78+
// static final VectorSpecies<Double> SPECIES = DoubleVector.SPECIES_PREFERRED;
7979

8080
private ColGroupDDC(IColIndex colIndexes, IDictionary dict, AMapToData data, int[] cachedCounts) {
8181
super(colIndexes, dict, cachedCounts);
@@ -611,16 +611,15 @@ private void identityRightDecompressingMult(MatrixBlock right, MatrixBlock ret,
611611
final double[] b = right.getDenseBlockValues();
612612
final double[] c = ret.getDenseBlockValues();
613613
final int jd = right.getNumColumns();
614-
final DoubleVector vVec = DoubleVector.zero(SPECIES);
615-
final int vLen = SPECIES.length();
614+
final int vLen = 8;
616615
final int lenJ = cru - crl;
617616
final int end = cru - (lenJ % vLen);
618617
for(int i = rl; i < ru; i++) {
619618
int k = _data.getIndex(i);
620619
final int offOut = i * jd + crl;
621620
final double aa = 1;
622621
final int k_right = _colIndexes.get(k);
623-
vectMM(aa, b, c, end, jd, crl, cru, offOut, k_right, vLen, vVec);
622+
vectMM(aa, b, c, end, jd, crl, cru, offOut, k_right, vLen);
624623

625624
}
626625
}
@@ -631,8 +630,8 @@ private void defaultRightDecompressingMult(MatrixBlock right, MatrixBlock ret, i
631630
final double[] c = ret.getDenseBlockValues();
632631
final int kd = _colIndexes.size();
633632
final int jd = right.getNumColumns();
634-
final DoubleVector vVec = DoubleVector.zero(SPECIES);
635-
final int vLen = SPECIES.length();
633+
// final DoubleVector vVec = DoubleVector.zero(SPECIES);
634+
final int vLen = 8;
636635

637636
final int blkzI = 32;
638637
final int blkzK = 24;
@@ -648,31 +647,32 @@ private void defaultRightDecompressingMult(MatrixBlock right, MatrixBlock ret, i
648647
for(int k = bk; k < bke; k++) {
649648
final double aa = a[offi + k];
650649
final int k_right = _colIndexes.get(k);
651-
vectMM(aa, b, c, end, jd, crl, cru, offOut, k_right, vLen, vVec);
650+
vectMM(aa, b, c, end, jd, crl, cru, offOut, k_right, vLen);
652651
}
653652
}
654653
}
655654
}
656655
}
657656

658-
final void vectMM(double aa, double[] b, double[] c, int endT, int jd, int crl, int cru, int offOut, int k, int vLen, DoubleVector vVec) {
659-
vVec = vVec.broadcast(aa);
657+
final void vectMM(double aa, double[] b, double[] c, int endT, int jd, int crl, int cru, int offOut, int k,
658+
int vLen) {
659+
// vVec = vVec.broadcast(aa);
660660
final int offj = k * jd;
661661
final int end = endT + offj;
662662
for(int j = offj + crl; j < end; j += vLen, offOut += vLen) {
663-
DoubleVector res = DoubleVector.fromArray(SPECIES, c, offOut);
664-
DoubleVector bVec = DoubleVector.fromArray(SPECIES, b, j);
665-
res = vVec.fma(bVec, res);
666-
res.intoArray(c, offOut);
667-
668-
// c[offOut] += aa * b[j];
669-
// c[offOut + 1] += aa * b[j + 1];
670-
// c[offOut + 2] += aa * b[j + 2];
671-
// c[offOut + 3] += aa * b[j + 3];
672-
// c[offOut + 4] += aa * b[j + 4];
673-
// c[offOut + 5] += aa * b[j + 5];
674-
// c[offOut + 6] += aa * b[j + 6];
675-
// c[offOut + 7] += aa * b[j + 7];
663+
// DoubleVector res = DoubleVector.fromArray(SPECIES, c, offOut);
664+
// DoubleVector bVec = DoubleVector.fromArray(SPECIES, b, j);
665+
// res = vVec.fma(bVec, res);
666+
// res.intoArray(c, offOut);
667+
668+
c[offOut] += aa * b[j];
669+
c[offOut + 1] += aa * b[j + 1];
670+
c[offOut + 2] += aa * b[j + 2];
671+
c[offOut + 3] += aa * b[j + 3];
672+
c[offOut + 4] += aa * b[j + 4];
673+
c[offOut + 5] += aa * b[j + 5];
674+
c[offOut + 6] += aa * b[j + 6];
675+
c[offOut + 7] += aa * b[j + 7];
676676
}
677677
for(int j = end; j < cru + offj; j++, offOut++) {
678678
double bb = b[j];

src/main/java/org/apache/sysds/runtime/compress/colgroup/dictionary/MatrixBlockDictionary.java

Lines changed: 1 addition & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
import java.util.Arrays;
2828
import java.util.Set;
2929

30-
import jdk.incubator.vector.DoubleVector;
31-
import jdk.incubator.vector.VectorSpecies;
3230
import org.apache.commons.lang3.NotImplementedException;
3331
import org.apache.sysds.runtime.compress.DMLCompressionException;
3432
import org.apache.sysds.runtime.compress.colgroup.indexes.ArrayIndex;
@@ -67,8 +65,6 @@ public class MatrixBlockDictionary extends ADictionary {
6765

6866
final private MatrixBlock _data;
6967

70-
static final VectorSpecies<Double> SPECIES = DoubleVector.SPECIES_PREFERRED;
71-
7268
/**
7369
* Unsafe private constructor that does not check the data validity. USE WITH CAUTION.
7470
*
@@ -2085,102 +2081,7 @@ private void preaggValuesFromDenseDictDenseAggArray(final int numVals, final ICo
20852081

20862082
private void preaggValuesFromDenseDictDenseAggRange(final int numVals, final IColIndex colIndexes, final int s,
20872083
final int e, final double[] b, final int cut, final double[] ret) {
2088-
if(colIndexes instanceof RangeIndex) {
2089-
RangeIndex ri = (RangeIndex) colIndexes;
2090-
preaggValuesFromDenseDictDenseAggRangeRange(numVals, ri.get(0), ri.get(0) + ri.size(), s, e, b, cut, ret);
2091-
}
2092-
else
2093-
preaggValuesFromDenseDictDenseAggRangeGeneric(numVals, colIndexes, s, e, b, cut, ret);
2094-
}
2095-
2096-
private void preaggValuesFromDenseDictDenseAggRangeRange(final int numVals, final int ls, final int le, final int rs,
2097-
final int re, final double[] b, final int cut, final double[] ret) {
2098-
final int cz = le - ls;
2099-
final int az = re - rs;
2100-
// final int nCells = numVals * cz;
2101-
final double[] values = _data.getDenseBlockValues();
2102-
// Correctly named ikj matrix multiplication .
2103-
2104-
final int blkzI = 32;
2105-
final int blkzK = 24;
2106-
final int blkzJ = 1024;
2107-
for(int bi = 0; bi < numVals; bi += blkzI) {
2108-
final int bie = Math.min(numVals, bi + blkzI);
2109-
for(int bk = 0; bk < cz; bk += blkzK) {
2110-
final int bke = Math.min(cz, bk + blkzK);
2111-
for(int bj = 0; bj < az; bj += blkzJ) {
2112-
final int bje = Math.min(az, bj + blkzJ);
2113-
final int sOffT = rs + bj;
2114-
final int eOffT = rs + bje;
2115-
preaggValuesFromDenseDictBlockedIKJ(values, b, ret, bi, bk, bj, bie, bke, cz, az, ls, cut, sOffT, eOffT);
2116-
// preaggValuesFromDenseDictBlockedIJK(values, b, ret, bi, bk, bj, bie, bke, bje, cz, az, ls, cut, sOffT, eOffT);
2117-
}
2118-
}
2119-
}
2120-
}
2121-
2122-
// private static void preaggValuesFromDenseDictBlockedIJK(double[] a, double[] b, double[] ret, int bi, int bk, int bj,
2123-
// int bie, int bke, int bje, int cz, int az, int ls, int cut, int sOffT, int eOffT) {
2124-
// final int vLen = SPECIES.length();
2125-
// final DoubleVector vVec = DoubleVector.zero(SPECIES);
2126-
// for(int i = bi; i < bie; i++) {
2127-
// final int offI = i * cz;
2128-
// final int offOutT = i * az + bj;
2129-
// int offOut = offOutT;
2130-
// final int end = (bje - bj) % vLen;
2131-
// for(int j = bj + sOffT; j < end + sOffT; j += vLen, offOut += vLen) {
2132-
// final DoubleVector res = DoubleVector.fromArray(SPECIES, ret, offOut);
2133-
// for(int k = bk; k < bke; k++) {
2134-
// final int idb = (k + ls) * cut;
2135-
// final double v = a[offI + k];
2136-
// vVec.broadcast(v);
2137-
// DoubleVector bVec = DoubleVector.fromArray(SPECIES, b, idb + j);
2138-
// vVec.fma(bVec, res);
2139-
// }
2140-
// res.intoArray(ret, offOut);
2141-
// }
2142-
// for(int j = end + sOffT; j < bje + sOffT; j++, offOut++) {
2143-
// for(int k = bk; k < bke; k++) {
2144-
// final int idb = (k + ls) * cut;
2145-
// final double v = a[offI + k];
2146-
// ret[offOut] += v * b[idb + j];
2147-
// }
2148-
// }
2149-
// }
2150-
// }
2151-
2152-
private static void preaggValuesFromDenseDictBlockedIKJ(double[] a, double[] b, double[] ret, int bi, int bk, int bj,
2153-
int bie, int bke, int cz, int az, int ls, int cut, int sOffT, int eOffT) {
2154-
final int vLen = SPECIES.length();
2155-
final DoubleVector vVec = DoubleVector.zero(SPECIES);
2156-
final int leftover = sOffT - eOffT % vLen; // leftover not vectorized
2157-
for(int i = bi; i < bie; i++) {
2158-
final int offI = i * cz;
2159-
final int offOutT = i * az + bj;
2160-
for(int k = bk; k < bke; k++) {
2161-
final int idb = (k + ls) * cut;
2162-
final int sOff = sOffT + idb;
2163-
final int eOff = eOffT + idb;
2164-
final double v = a[offI + k];
2165-
vecInnerLoop(v, b, ret, offOutT, eOff, sOff, leftover, vLen, vVec);
2166-
}
2167-
}
2168-
}
2169-
2170-
private static void vecInnerLoop(final double v, final double[] b, final double[] ret, final int offOutT,
2171-
final int eOff, final int sOff, final int leftover, final int vLen, DoubleVector vVec) {
2172-
int offOut = offOutT;
2173-
vVec = vVec.broadcast(v);
2174-
final int end = eOff - leftover;
2175-
for(int j = sOff; j < end; j += vLen, offOut += vLen) {
2176-
DoubleVector res = DoubleVector.fromArray(SPECIES, ret, offOut);
2177-
DoubleVector bVec = DoubleVector.fromArray(SPECIES, b, j);
2178-
vVec.fma(bVec, res).intoArray(ret, offOut);
2179-
}
2180-
for(int j = end; j < eOff; j++, offOut++) {
2181-
ret[offOut] += v * b[j];
2182-
}
2183-
2084+
preaggValuesFromDenseDictDenseAggRangeGeneric(numVals, colIndexes, s, e, b, cut, ret);
21842085
}
21852086

21862087
private void preaggValuesFromDenseDictDenseAggRangeGeneric(final int numVals, final IColIndex colIndexes,

0 commit comments

Comments
 (0)