Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot call legacy functions #46

Closed
lharri73 opened this issue Mar 9, 2023 · 3 comments
Closed

Cannot call legacy functions #46

lharri73 opened this issue Mar 9, 2023 · 3 comments

Comments

@lharri73
Copy link

lharri73 commented Mar 9, 2023

device_count() panics with value: FailedToLoadSymbol("/lib64/libnvidia-ml.so: undefined symbol: nvmlDeviceGetComputeRunningProcesses_v3")

nvml_wrapper version: 0.9.0 (with legacy-functions feature)
nvidia driver version: 470.161.03

Is something else required to call the v2 version of this function?

@TheElectronWill
Copy link
Contributor

TheElectronWill commented Mar 11, 2023

edit: nevermind, I didn't see that you've already enabled the legacy-functions feature 😅
It's weird then. Maybe you can call the right version directly from nvml-wrapper-sys?

@Cldfire
Copy link
Owner

Cldfire commented Mar 13, 2023

@lharri73 Nvml.device_count() is implemented as:

    pub fn device_count(&self) -> Result<u32, NvmlError> {
        let sym = nvml_sym(self.lib.nvmlDeviceGetCount_v2.as_ref())?;

        unsafe {
            let mut count: c_uint = mem::zeroed();
            nvml_try(sym(&mut count))?;

            Ok(count)
        }
    }

Meaning it is already trying to call the v2 version of the function (self.lib.nvmlDeviceGetCount_v2).

The error you shared implies you were trying to call Device.running_compute_processes(). Can you clarify what you were calling here and share a bit of your code please? 🙂

@Cldfire
Copy link
Owner

Cldfire commented Apr 16, 2023

Closing for inactivity. If you're still having issues feel free to comment 🙂

@Cldfire Cldfire closed this as completed Apr 16, 2023
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

No branches or pull requests

3 participants