Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
coreylowman committed Jun 28, 2024
1 parent 6a2f577 commit 32538f2
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
8 changes: 1 addition & 7 deletions src/cudnn/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub fn get_cudart_version() -> usize {

/// Runs all *VersionCheck functions.
pub fn version_check() -> Result<(), CudnnError> {
#[cfg(not(any(feature = "cuda-11040", feature = "cuda-12030", feature = "cuda-12040", feature = "cuda-12050")))]
#[cfg(not(any(feature = "cuda-12030", feature = "cuda-12040", feature = "cuda-12050")))]
unsafe {
lib().cudnnAdvInferVersionCheck().result()?;
lib().cudnnAdvTrainVersionCheck().result()?;
Expand All @@ -55,12 +55,6 @@ pub fn version_check() -> Result<(), CudnnError> {
lib().cudnnOpsInferVersionCheck().result()?;
lib().cudnnOpsTrainVersionCheck().result()?;
}
#[cfg(feature = "cuda-11040")]
unsafe {
lib().cudnnAdvVersionCheck().result()?;
lib().cudnnCnnVersionCheck().result()?;
lib().cudnnOpsVersionCheck().result()?;
}
#[cfg(feature = "cuda-12030")]
unsafe {
lib().cudnnAdvVersionCheck().result()?;
Expand Down
14 changes: 12 additions & 2 deletions src/driver/safe/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,12 @@ impl CudaFunction {
Ok(num_blocks as u32)
}

#[cfg(not(any(feature = "cuda-11070", feature = "cuda-11060", feature = "cuda-11050", feature = "cuda-11040")))]
#[cfg(not(any(
feature = "cuda-11070",
feature = "cuda-11060",
feature = "cuda-11050",
feature = "cuda-11040"
)))]
pub fn occupancy_max_active_clusters(
&self,
config: crate::driver::LaunchConfig,
Expand Down Expand Up @@ -410,7 +415,12 @@ impl CudaFunction {
Ok((min_grid_size as u32, block_size as u32))
}

#[cfg(not(any(feature = "cuda-11070", feature = "cuda-11060", feature = "cuda-11050", feature = "cuda-11040")))]
#[cfg(not(any(
feature = "cuda-11070",
feature = "cuda-11060",
feature = "cuda-11050",
feature = "cuda-11040"
)))]
pub fn occupancy_max_potential_cluster_size(
&self,
config: crate::driver::LaunchConfig,
Expand Down
14 changes: 12 additions & 2 deletions src/nccl/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ impl sys::ncclResult_t {
/// See [cuda docs](https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api/comms.html?c.ncclCommFinalize)
/// # Safety
/// User is in charge of sending valid pointers.
#[cfg(not(any(feature = "cuda-11040", feature = "cuda-11050", feature = "cuda-11060", feature = "cuda-11070")))]
#[cfg(not(any(
feature = "cuda-11040",
feature = "cuda-11050",
feature = "cuda-11060",
feature = "cuda-11070"
)))]
pub unsafe fn comm_finalize(comm: sys::ncclComm_t) -> Result<NcclStatus, NcclError> {
lib().ncclCommFinalize(comm).result()
}
Expand Down Expand Up @@ -82,7 +87,12 @@ pub fn get_uniqueid() -> Result<sys::ncclUniqueId, NcclError> {
/// See [cuda docs](https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api/comms.html?ncclcomminitrankconfig)
/// # Safety
/// User is in charge of sending valid pointers.
#[cfg(not(any(feature = "cuda-11040", feature = "cuda-11050", feature = "cuda-11060", feature = "cuda-11070")))]
#[cfg(not(any(
feature = "cuda-11040",
feature = "cuda-11050",
feature = "cuda-11060",
feature = "cuda-11070"
)))]
pub unsafe fn comm_init_rank_config(
comm: *mut sys::ncclComm_t,
nranks: ::core::ffi::c_int,
Expand Down

0 comments on commit 32538f2

Please sign in to comment.