Unintuitive out of memory errors, and odd OOMs
Personne n'a encore pris cette issue.
- Langage dominant
- Java
- Étoiles
- 928
- Forks
- 227
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
I'm experimenting with TensorScope, and thus using large amounts of memory for tensors. However, when I try this, I get odd oom-related errors.
Example (kotlin):
repeat(1000) {
TFloat32.tensorOf(Shape.of(10000, 10000))
}
gives
2021-01-11 20:36:45.599992: W external/org_tensorflow/tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 400000000 exceeds 10% of free system memory.
2021-01-11 20:36:45.625897: W external/org_tensorflow/tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 400000000 exceeds 10% of free system memory.
2021-01-11 20:36:45.626092: W external/org_tensorflow/tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 400000000 exceeds 10% of free system memory.
2021-01-11 20:36:45.626180: W external/org_tensorflow/tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 400000000 exceeds 10% of free system memory.
2021-01-11 20:36:45.626262: W external/org_tensorflow/tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 400000000 exceeds 10% of free system memory.
Exception in thread "main" java.lang.NullPointerException
at org.tensorflow.internal.buffer.TensorBuffers.tensorMemory(TensorBuffers.java:180)
at org.tensorflow.internal.buffer.TensorBuffers.toFloats(TensorBuffers.java:102)
at org.tensorflow.internal.types.TFloat32Mapper.mapDense(TFloat32Mapper.java:34)
at org.tensorflow.internal.types.TFloat32Mapper.mapDense(TFloat32Mapper.java:30)
at org.tensorflow.RawTensor.asTypedTensor(RawTensor.java:215)
at org.tensorflow.Tensor.of(Tensor.java:90)
at org.tensorflow.Tensor.of(Tensor.java:63)
at org.tensorflow.types.TFloat32.tensorOf(TFloat32.java:79)
at tester.TensorScopeKt.main(TensorScope.kt:8)
at tester.TensorScopeKt.main(TensorScope.kt)
I'd think this is a fairly straight forward OOM, just without nice error messages, but the used memory in Task Manager (I'm on Windows) barely moves. I do start using heap memory, but it caps 100MB, even with -Xmx6g. Is there some limit on tensor allocations I'm not aware of?
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par reproduire l’exemple Kotlin via TFloat32.tensorOf et retracez l’échec signalé à org/tensorflow/internal/buffer/TensorBuffers.java:180. Comparez les avertissements d’allocation native avec l’exception côté Java et définissez done comme le fait de signaler les échecs d’allocation avec une erreur précise et exploitable au lieu de la NullPointerException observée.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java, kotlin
- Domaine
- machine-learning
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 35/100