Comments (5)
Hey! I have seen this and I will give it some thought, but I won't have time to reply for another couple of days 🙂.
from nvml-wrapper.
Thank you for your reply! Please feel free to tell me it when you're free.
from nvml-wrapper.
@Cldfire How is it going? May I submit one?
from nvml-wrapper.
Sorry for taking so long to reply! I got busy with life stuff.
So, I've put some thought into this and I have two main concerns here:
-
In order for me to accept a PR for this we would need to end up with
nvmlDeviceGetGraphicsRunningProcesses_v2
being generated and present as a symbol innvml-wrapper-sys/src/bindings.rs
. I don't want to mess around with opening and loading a second library definition to support legacy function calls. Doing this will require making surebindgen
generates bindings for the functions in thisifdef
, and making sure that's accomplished without modifyingnvml.h
in the source tree:nvml-wrapper/nvml-wrapper-sys/nvml.h
Lines 9106 to 9129 in 1e943a4
-
I don't want to clog editor autocomplete with the names of legacy methods. This means avoiding a situation where the default autocomplete experience when using this library is seeing the following:
device.running_graphics_<|> ------------------------------------------ device.running_graphics_processes() device.running_graphics_processes_v1() device.running_graphics_processes_v2() ------------------------------------------
This excludes a trait-based approach for bringing these into scope because
rust-analyzer
is smart enough to discover method calls that could be made available by importing a trait and suggest those for autocomplete. The only way to preserve a good default autocomplete experience here would be to have a crate feature such as "legacy-functions" that could be enabled to compile support for older function calls in the wrapper.
from nvml-wrapper.
@KisaragiEffective I put together a branch meeting both of the constraints I laid out above. It's in a PR here: #39
Please give that a look and let me know if it would satisfy your needs 🙂.
from nvml-wrapper.
Related Issues (20)
- Linking error while building on Windows HOT 2
- Name of the crate HOT 2
- Load NVML lib at runtime HOT 4
- Any way to build without /usr/lib? HOT 4
- Use the `#[doc(alias = "...")]` attribute on wrapper methods
- Rename `NVML` struct to `Nvml`
- Accept more variants of lib name or make internal init public HOT 2
- Lifecycle problems with `device_by_index` HOT 3
- Explore reference counting to maintain lifetime relationships among NVML data structures
- nvmlDeviceSetGpuLockedClocks vs nvmlDeviceSetMemoryLockedClocks HOT 2
- GPU Temp sensors HOT 2
- Device Brand function fails for new RTX cards
- Cannot call legacy functions HOT 3
- "libnvidia-ml.so: cannot open shared object file: No such file or directory HOT 3
- Segmentation fault when fetching graphics processes HOT 6
- FailedToLoadSymbol("GetProcAddress failed") with Windows studio driver v536.99 HOT 2
- failing to load driver nvml from wsl2 HOT 1
- Support for querying scoped fields HOT 2
- process_utilization_stats failed with NOT_FOUND error, Ubuntu 22.04
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvml-wrapper.