This commit is contained in:
sugarme 2022-02-19 16:59:33 +11:00
parent 2d5031009b
commit 66cea05f28
2 changed files with 3 additions and 2 deletions

View File

@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- added nn.BatchNorm.Forward() with default training=true
- added exposing `tensor.Ctensor()`
- added API `tensor.FromCtensor()`
- [#67]: fixed incorrect type casting at `atc_cuda_count`
## [Nofix]
- ctype `long` caused compiling error in MacOS as noted on [#44]. Not working on linux box.

View File

@ -111,9 +111,9 @@ func GetAndResetLastErr() *C.char {
}
// int atc_cuda_device_count();
func AtcCudaDeviceCount() int {
func AtcCudaDeviceCount() int32 {
result := C.atc_cuda_device_count()
return *(*int)(unsafe.Pointer(&result))
return *(*int32)(unsafe.Pointer(&result))
}
// int atc_cuda_is_available();