Changelog
Source:NEWS.md
cuda.ml 0.4.0
CRAN release: 2026-08-21
This is a breaking release for users upgrading from the cuda.ml 0.3 release series. It requires R 4.1 or newer and targets CUDA Toolkit 13.2.2, RAPIDS cuML and nvForest 26.06, and Treelite 4.7.0.
Installation and runtime
The CRAN package is now a portable R installer and loader with no compiled code or bundled CUDA libraries. On Linux x86_64 with glibc 2.28 or newer,
cuda_ml_install()explicitly prepares the pinned native backend and its approximately 1.6 GiB CUDA and RAPIDS runtime. Repeated calls reuse the prepared cache.cuda_ml_install(source = TRUE)builds the backend on a supported host. Its managed mode prepares the pinned CUDA, RAPIDS, Treelite, CMake, and Ninja build inputs and requires GNU C++ 14 or newer. Usedependencies = "host"to supply all native build inputs. Managed builds detect distinct CUDA-visible architectures when possible, whilearchitectures = "native","portable", or an explicit CMake architecture list selects the build target policy.Loading cuda.ml is silent; it does not inspect a GPU, load native code, modify the cache, or use the network.
cuda_ml_backend_info()reports pinned versions and cache status without those actions.cuda_ml_runtime_audit()is the separate, explicit full content and native registration check, andcuda_ml_cache_clean()removes managed cache generations.CPU nvForest inference requires a prepared cuda.ml backend. It can use the complete runtime installed by
cuda_ml_install()or the separate CPU-only backend installed bycuda_ml_install(device = "cpu"). Selectingdevice = "cpu"when loading or restoring a model does not itself prepare a backend.Prebuilt GPU backends contain real targets for compute capabilities 7.5, 8.0, 8.6, 8.9, 9.0, 10.0, and 12.0, plus PTX forward compatibility from 12.0.
Models and public APIs
The former FIL interface was replaced by nvForest. Use
cuda_ml_nvforest_load_model()for XGBoost models, LightGBM text models, and Treelite checkpoints, standardpredict()for inference, and thecuda_ml_nvforest_*()inspection, checkpoint export, and import functions for nvForest-specific operations. Random-forest fits now use nvForest for prediction and persistence as well.The random-forest API changed.
mtrycontrols predictor sampling,sample_fractioncontrols row sampling and defaults to 1, and the separatemax_predictors_per_note_splitargument was removed. Whenmtryis omitted, classification uses the square root of the predictor count and regression uses all predictors.treesdefaults to 100. Whenseedis omitted, it is drawn from R’s random-number generator, soset.seed()controls the fit. Themax_batch_sizeandn_streamsdefaults are now 4096 and 4. Regression split criteria are now"mse","poisson","gamma", and"inverse_gaussian";"mae"was removed. Classification predictions usepredict(..., type = "class")orpredict(..., type = "prob").Logistic and multinomial regression now use numeric
penaltyandmixturearguments consistent with parsnip instead of the previouspenalty,C, andl1_ratiocombination. The default is now unregularized; set a numericpenaltyto request regularization. The iteration arguments are nowmax_iterandlinesearch_max_iter;lbfgs_memoryandpenalty_normalizedprovide additional solver controls.cuda_ml_linear_reg()provides the corresponding parsnip-style routing across OLS, ridge, lasso, and elastic-net fits.The
normalize_inputargument was removed from OLS, ridge, lasso, and elastic-net models. It previously requested GPU-side L2 normalization.recipes::step_normalize()is the recommended explicit preprocessing step when centering and scaling are appropriate, but it is not numerically identical to the former L2 operation.cuda_ml_sgd()now fits squared-loss regression only, so itslossargument was removed, andn_iters_no_changewas renamed ton_iter_no_change. Prediction methods now consistently usenew_data; KNN classification usestype = "class"ortype = "prob"instead ofoutput_class_probabilities.Parsnip is optional. cuda.ml registers engines when parsnip is loaded, including
linear_reg(),logistic_reg(), andmultinom_reg()engines that use the usualpenaltyandmixturearguments.Random projection and KNN IVFSQ were removed and have no current replacement in the pinned upstream API. KNN continues to support brute-force, IVFFlat, and IVFPQ search. The unused
use_precomputed_tablesargument was removed fromcuda_ml_knn_algo_ivfpq().The per-call
cuML_log_levelarguments were removed.has_cuML(),cuML_major_version(), andcuML_minor_version()were removed in favor of fields returned bycuda_ml_backend_info().cuda_ml_is_classifier()andcuda_ml_can_predict_class_probabilities()were removed. Use the documentedpredict()types for each model; for nvForest models,cuda_ml_nvforest_info()reportstask_typeandhas_probability_output. Thecuda_ml_serialise()andcuda_ml_unserialise()aliases were also removed; usecuda_ml_serialize()andcuda_ml_unserialize().
Model persistence
cuda_ml_serialize()andcuda_ml_unserialize()now provide durable model states for OLS, ridge, lasso, elastic-net, SGD, logistic and multinomial regression, PCA, binary and one-vs-rest SVC, SVR, UMAP, random forest, and nvForest models. Passing a file path writes or reads a gzip-compressed state; open connections and in-memory raw vectors are also supported. KNN and TSVD fits are not currently supported: the pinned KNN API does not expose portable approximate-index state, and the current TSVD binding does not reconstruct its native transform parameters.bundle::bundle()stores the same explicit state for workflows that use the bundle package. Both interfaces support saving an artifact and restoring it in a fresh R process after the target environment prepares the required backend. nvForest models can also be exported and imported as a Treelite checkpoint plus cuda.ml metadata.cuda.ml validates each saved state and its required backend before restoring the model.