This commit is contained in:
sugarme 2023-07-23 14:54:02 +10:00
parent 1fc13ec55e
commit 30068c6b41
2 changed files with 6 additions and 0 deletions

View File

@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added conv2d benchmark
- Fixed #88 memory leak at `example/char-rnn`
- Added missing tensor `Stride()` and `MustDataPtr()`, `IsMkldnn`, `MustIsMkldnn`, `IsContiguous`, `MustIsContiguous`
- Added ts `New()`
## [Nofix]
- ctype `long` caused compiling error in MacOS as noted on [#44]. Not working on linux box.

View File

@ -82,6 +82,11 @@ func newTensor(ctensor lib.Ctensor, nameOpt ...string) *Tensor {
return x
}
// New creates new tensor from C tensor.
func New(ctensor lib.Ctensor, nameOpt ...string) *Tensor {
return newTensor(ctensor, nameOpt...)
}
func CheckCMemLeak() string {
tensors := []string{}
lock.Lock()