Skip to content

When cudnn drop in test environment, it throws STATUS_STACK_BUFFER_OVERRUN #362

Open
@Jianqoq

Description

@Jianqoq
impl Drop for Cudnn {
    fn drop(&mut self) {
        let handle = std::mem::replace(&mut self.handle, std::ptr::null_mut());
        if !handle.is_null() {
            unsafe { result::destroy_handle(handle) }.unwrap();
        }
    }
}

the unwarp thrown error.

I am using thread local but not sure why cudnn has this issue. cublas doesn't

#[cfg(feature = "cuda")]
thread_local! {
    static CUDNN: RefCell<HashMap<usize, Arc<cudarc::cudnn::Cudnn>>> = HashMap::new().into();
}

#[cfg(feature = "cuda")]
thread_local! {
    static CUBLAS: RefCell<HashMap<usize, Arc<cudarc::cublas::CudaBlas>>> = HashMap::new().into();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions