[Breaking][jvm-packages] Bump rapids version to 22.12.0 (#8648)
* [jvm-packages] Bump rapids version to 22.12.0 This PR bumps spark version to 3.1.1 and the rapids version to 22.12.0, which results in the latest xgboost can't run with the old rapids packages.
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
package ml.dmlc.xgboost4j.scala.rapids.spark
|
||||
|
||||
import ai.rapids.cudf.Table
|
||||
import com.nvidia.spark.rapids.{ColumnarRdd, GpuColumnVector}
|
||||
import com.nvidia.spark.rapids.{ColumnarRdd, GpuColumnVectorUtils}
|
||||
import ml.dmlc.xgboost4j.scala.spark.util.Utils
|
||||
|
||||
import org.apache.spark.rdd.RDD
|
||||
@@ -31,16 +31,7 @@ private[spark] object GpuUtils {
|
||||
|
||||
def extractBatchToHost(table: Table, types: Array[DataType]): Array[ColumnVector] = {
|
||||
// spark-rapids has shimmed the GpuColumnVector from 22.10
|
||||
try {
|
||||
val clazz = Utils.classForName("com.nvidia.spark.rapids.GpuColumnVectorUtils")
|
||||
clazz.getDeclaredMethod("extractHostColumns", classOf[Table], classOf[Array[DataType]])
|
||||
.invoke(null, table, types).asInstanceOf[Array[ColumnVector]]
|
||||
} catch {
|
||||
case _: ClassNotFoundException =>
|
||||
// If it's older version, use the GpuColumnVector
|
||||
GpuColumnVector.extractColumns(table, types).map(_.copyToHost())
|
||||
case e: Throwable => throw e
|
||||
}
|
||||
GpuColumnVectorUtils.extractHostColumns(table, types)
|
||||
}
|
||||
|
||||
def toColumnarRdd(df: DataFrame): RDD[Table] = ColumnarRdd(df)
|
||||
|
||||
Reference in New Issue
Block a user