Skip to content

Add liblantern for platform amd gpu. - #1498

Draft
cregouby wants to merge 45 commits into
mlverse:mainfrom
cregouby:platform/amd_gpu
Draft

cregouby wants to merge 45 commits into
mlverse:mainfrom
cregouby:platform/amd_gpu

Conversation

@cregouby

@cregouby cregouby commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Relies on mlverse/cudatoolkit#8 to

  1. build lantern.so for ROCM6.4 via

CI — New composite action build-rocm-lantern and rocm-kit.yaml workflow handle the libtorch download, build, audit, and artifact upload.

  1. add install_torch() option to use it with `Sys.setenv(CUDA="rocm6.4")

Change Map

R/install.R — Adds ROCm detection to the installation chain:

  • is_rocm_version() / check_supported_rocm_version_linux() / rocm_bundle_is_installed() as shared predicates
  • rocm_version_from_system_linux() probes /opt/rocm/.info/version as a fallback in cuda_version()
  • installation_kind() returns the ROCm version string directly
  • cuda_version_from_cudatoolkit() constructs rocmX.Y package names instead of cudarocmX.Y
  • install_torch_sitrep() gains a ROCm/HIP section and guards two CUDA-specific checks

R/lantern_load.R — Fixes package-name construction for ROCm cudatoolkit packages; adds tryCatch around lib_path() to prevent startup failures; adds Windows cuDNN PATH prepend.

add version retrieval at install time
trying to avoid HIP stack by requesting only ROCM packages
fix CMAKE_CXX_COMPILER
switch to libtorch rocm 5.2
add rocTHRUST as REQUIRED
… make -j12`.

Still stuck at `make[2]: ***  Aucune règle pour fabriquer la cible « /opt/rocm/miopen/lib/libMIOpen.so », nécessaire pour « liblantern.so ». Arrêt. `
make ROCm 5.2 version consistant
switch from version to type in `install_type()`
add missing apt packages to run it
add ROCm version check in `CMakeLists`
fix typo in package name
libtorch rocm build 5.3 is now available
update md5hash of pytorch libtorch zips
add more control messages to CmakeLists
# Conflicts:
#	.github/workflows/lantern.yaml
#	DESCRIPTION
#	R/install.R
#	lantern/CMakeLists.txt
#	man/nn_module_list.Rd
#	man/torch_lstsq.Rd
#	man/torch_matrix_rank.Rd
# Conflicts:
#	.github/workflows/lantern.yaml
#	R/install.R
#	man/torch_symeig.Rd
# Conflicts:
#	.github/workflows/lantern.yaml
# Conflicts:
#	.github/workflows/lantern.yaml
…ntern.so . v14 succeeded, v15 fails at 56% (WiP)
@cregouby
cregouby marked this pull request as draft November 12, 2026 09:09
@cregouby
cregouby marked this pull request as draft November 12, 2026 09:09

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant