Skip to content

Commit

Permalink
Update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Cldfire committed Oct 14, 2023
1 parent fbf91bd commit 9481e36
Show file tree
Hide file tree
Showing 23 changed files with 143 additions and 72 deletions.
141 changes: 111 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nvml-wrapper-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ categories = ["external-ffi-bindings", "hardware-support"]
exclude = ["nvml.h"]

[dependencies]
libloading = "0.7.0"
libloading = "0.8.1"

[features]
default = []
Expand Down
8 changes: 5 additions & 3 deletions nvml-wrapper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ categories = ["api-bindings", "hardware-support"]
[features]
default = []
legacy-functions = ["nvml-wrapper-sys/legacy-functions"]
serde = ["dep:serde", "serde_derive", "bitflags/serde"]

[dependencies]
thiserror = "1.0"
bitflags = "1.3"
serde = { version = "1.0", optional = true, features = ["derive"] }
bitflags = "2.4.0"
serde = { version = "1.0", optional = true }
serde_derive = { version = "1.0.189", optional = true }
nvml-wrapper-sys = { version = "0.7.0", path = "../nvml-wrapper-sys" }
wrapcenum-derive = "0.4.0"
libloading = "0.7.0"
libloading = "0.8.1"
static_assertions = "1.1"

[dev-dependencies]
Expand Down
4 changes: 3 additions & 1 deletion nvml-wrapper/src/bitmasks/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
use crate::ffi::bindings::*;
use bitflags::bitflags;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use serde_derive::{Deserialize, Serialize};

bitflags! {
/// Flags used to specify why a GPU is throttling.
// Checked against local
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub struct ThrottleReasons: u64 {
/// Nothing is running on the GPU.
///
Expand Down Expand Up @@ -75,6 +76,7 @@ bitflags! {
bitflags! {
/// Flags that specify info about a frame capture session
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub struct FbcFlags: u32 {
const DIFFMAP_ENABLED = NVML_NVFBC_SESSION_FLAG_DIFFMAP_ENABLED;
const CLASSIFICATIONMAP_ENABLED = NVML_NVFBC_SESSION_FLAG_CLASSIFICATIONMAP_ENABLED;
Expand Down
3 changes: 2 additions & 1 deletion nvml-wrapper/src/bitmasks/event.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::ffi::bindings::*;
use bitflags::bitflags;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use serde_derive::{Deserialize, Serialize};

bitflags! {
/**
Expand All @@ -12,6 +12,7 @@ bitflags! {
*/
// Checked against local
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub struct EventTypes: u64 {
/// A corrected texture memory error is not an ECC error, so it does not
/// generate a single bit event.
Expand Down
4 changes: 2 additions & 2 deletions nvml-wrapper/src/bitmasks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pub mod nv_link;
use crate::ffi::bindings::*;
use bitflags::bitflags;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use serde_derive::{Deserialize, Serialize};

bitflags! {
/// Generic flags used to specify the default behavior of some functions.
Expand All @@ -20,7 +20,7 @@ bitflags! {
bitflags! {
/// Flags that can be passed to `Nvml::init_with_flags()`.
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Default)]
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Default)]
pub struct InitFlags: u32 {
/// Don't fail to initialize when no NVIDIA GPUs are found.
const NO_GPUS = NVML_INIT_FLAG_NO_GPUS;
Expand Down
3 changes: 2 additions & 1 deletion nvml-wrapper/src/bitmasks/nv_link.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::ffi::bindings::*;
use bitflags::bitflags;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use serde_derive::{Deserialize, Serialize};

bitflags! {
/**
Expand All @@ -12,6 +12,7 @@ bitflags! {
*/
// Checked against local
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub struct PacketTypes: u32 {
const NO_OP = nvmlNvLinkUtilizationCountPktTypes_enum_NVML_NVLINK_COUNTER_PKTFILTER_NOP;
const READ = nvmlNvLinkUtilizationCountPktTypes_enum_NVML_NVLINK_COUNTER_PKTFILTER_READ;
Expand Down
2 changes: 1 addition & 1 deletion nvml-wrapper/src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2474,7 +2474,7 @@ impl<'nvml> Device<'nvml> {

Ok(addresses
.into_iter()
.zip(timestamps.into_iter())
.zip(timestamps)
.map(|(address, timestamp)| RetiredPage { address, timestamp })
.collect())
}
Expand Down
2 changes: 1 addition & 1 deletion nvml-wrapper/src/enum_wrappers/device.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::error::NvmlError;
use crate::ffi::bindings::*;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use serde_derive::{Deserialize, Serialize};
use wrapcenum_derive::EnumWrapper;

/// API types that allow changes to default permission restrictions.
Expand Down
2 changes: 1 addition & 1 deletion nvml-wrapper/src/enum_wrappers/nv_link.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::error::NvmlError;
use crate::ffi::bindings::*;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use serde_derive::{Deserialize, Serialize};
use wrapcenum_derive::EnumWrapper;

/// Represents the NvLink utilization counter packet units.
Expand Down
Loading

0 comments on commit 9481e36

Please sign in to comment.