File tree Expand file tree Collapse file tree
solr/modules/cuvs/src/java/org/apache/solr/cuvs Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ title : Fix for GPU vector indexing silently falling back to using CPU instead
2+ type : fixed
3+ authors :
4+ - name : Rahul Goswami
5+ links :
6+ - name : SOLR-18210
7+ url : https://issues.apache.org/jira/browse/SOLR-18210
Original file line number Diff line number Diff line change @@ -77,6 +77,17 @@ public static synchronized GpuMetricsService getInstance() {
7777
7878 public void initialize (CoreContainer coreContainer ) {
7979 if (initialized .compareAndSet (false , true )) {
80+ // Ensure CUDA runtime is loaded before any cuVS provider access
81+ try {
82+ System .loadLibrary ("cudart" );
83+ } catch (UnsatisfiedLinkError e ) {
84+ String msg = e .getMessage ();
85+ if (msg != null && msg .contains ("already loaded in another classloader" )) {
86+ // cudart is available, just loaded elsewhere - safe to continue
87+ } else {
88+ log .warn ("Could not load CUDA runtime library (libcudart not available) " , e );
89+ }
90+ }
8091 this .metricManager = coreContainer .getMetricManager ();
8192 startBackgroundService ();
8293 log .info ("GPU metrics service initialized" );
You can’t perform that action at this time.
0 commit comments