Runtime error using Numpy readers: Unknown Numpy type c8
@stiepan is already working on this.
Since Jan 4, 2024.
- Dominant language
- C++
- Stars
- 5.8k
- Forks
- 678
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 27
Description
Is this a new feature, an improvement, or a change to existing functionality?
Improvement
How would you describe the priority of this feature request
Must have (e.g. DALI adoption is impossible due to lack in functionality).
Please provide a clear description of problem this feature solves
Hello,
Currently, the numpy reader operator does not support complex-floating point types like c8 or c16. This would be a nice addition to load such data from npy files.
When loading such a npy file, the following error gets raised Error in thread 0: [/opt/dali/dali/operators/reader/loader/numpy_loader_gpu.cc:42] [/opt/dali/dali/util/numpy.cc:40] Unknown Numpy type string: c8:
[1,0]<stderr>: File "/root/distributed-continual-learning/data/load.py", line 202, in __init__
[1,0]<stderr>: test = taskset_pipeline.run()
[1,0]<stderr>: File "/my-spack/view/._chifflot-v100/44wryknjqgrv67asl5pa7vbcfrxorbcb/lib/python3.10/site-packages/nvidia/dali/pipeline.py", line 1113, in run
[1,0]<stderr>: return self.outputs()
[1,0]<stderr>: File "/my-spack/view/._chifflot-v100/44wryknjqgrv67asl5pa7vbcfrxorbcb/lib/python3.10/site-packages/nvidia/dali/pipeline.py", line 956, in outputs
[1,0]<stderr>: return self._outputs()
[1,0]<stderr>: File "/my-spack/view/._chifflot-v100/44wryknjqgrv67asl5pa7vbcfrxorbcb/lib/python3.10/site-packages/nvidia/dali/pipeline.py", line 1040, in _outputs
[1,0]<stderr>: return self._pipe.Outputs()
[1,0]<stderr>:RuntimeError: Critical error in pipeline:
[1,0]<stderr>:Error when executing GPU operator readers__Numpy, instance name: "__Numpy_1", encountered:
[1,0]<stderr>:Error in thread 0: [/opt/dali/dali/operators/reader/loader/numpy_loader_gpu.cc:42] [/opt/dali/dali/util/numpy.cc:40] Unknown Numpy type string: c8
[1,0]<stderr>:Stacktrace (10 entries):
[1,0]<stderr>:[frame 0]: /my-spack/view/._chifflot-v100/44wryknjqgrv67asl5pa7vbcfrxorbcb/lib/python3.10/site-packages/nvidia/dali/libdali.so(+0xd300b) [0x7f510477900b]
[1,0]<stderr>:[frame 1]: /my-spack/view/._chifflot-v100/44wryknjqgrv67asl5pa7vbcfrxorbcb/lib/python3.10/site-packages/nvidia/dali/libdali.so(+0x961d8) [0x7f510473c1d8]
[1,0]<stderr>:[frame 2]: /my-spack/view/._chifflot-v100/44wryknjqgrv67asl5pa7vbcfrxorbcb/lib/python3.10/site-packages/nvidia/dali/libdali.so(dali::numpy::ParseHeaderContents(dali::numpy::HeaderData&, std::string const&)+0x10b) [0x7f51048b8a0b]
[1,0]<stderr>:[frame 3]: /my-spack/view/._chifflot-v100/44wryknjqgrv67asl5pa7vbcfrxorbcb/lib/python3.10/site-packages/nvidia/dali/libdali.so(+0x2132bd) [0x7f51048b92bd]
[1,0]<stderr>:[frame 4]: /my-spack/view/._chifflot-v100/44wryknjqgrv67asl5pa7vbcfrxorbcb/lib/python3.10/site-packages/nvidia/dali/libdali.so(dali::numpy::ParseHeader(dali::numpy::HeaderData&, dali::InputStream*)+0x290) [0x7f51048ba0a0]
[1,0]<stderr>:[frame 5]: /my-spack/view/._chifflot-v100/44wryknjqgrv67asl5pa7vbcfrxorbcb/lib/python3.10/site-packages/nvidia/dali/libdali_operators.so(+0x3c7691f) [0x7f509160791f]
[1,0]<stderr>:[frame 6]: /my-spack/view/._chifflot-v100/44wryknjqgrv67asl5pa7vbcfrxorbcb/lib/python3.10/site-packages/nvidia/dali/libdali.so(dali::ThreadPool::ThreadMain(int, int, bool, std::string const&)+0x1e6) [0x7f510485fe86]
[1,0]<stderr>:[frame 7]: /my-spack/view/._chifflot-v100/44wryknjqgrv67asl5pa7vbcfrxorbcb/lib/python3.10/site-packages/nvidia/dali/libdali.so(+0x769dd0) [0x7f5104e0fdd0]
[1,0]<stderr>:[frame 8]: /lib/x86_64-linux-gnu/libpthread.so.0(+0x7ea7) [0x7f51bae8fea7]
[1,0]<stderr>:[frame 9]: /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f51bac60a2f]
[1,0]<stderr>:. File: /my-spack/datasets/Ptycho/train/204/patched_psi.npy
[1,0]<stderr>:Stacktrace (6 entries):
[1,0]<stderr>:[frame 0]: /my-spack/view/._chifflot-v100/44wryknjqgrv67asl5pa7vbcfrxorbcb/lib/python3.10/site-packages/nvidia/dali/libdali_operators.so(+0x686e8e) [0x7f508e017e8e]
[1,0]<stderr>:[frame 1]: /my-spack/view/._chifflot-v100/44wryknjqgrv67asl5pa7vbcfrxorbcb/lib/python3.10/site-packages/nvidia/dali/libdali_operators.so(+0x530252) [0x7f508dec1252]
[1,0]<stderr>:[frame 2]: /my-spack/view/._chifflot-v100/44wryknjqgrv67asl5pa7vbcfrxorbcb/lib/python3.10/site-packages/nvidia/dali/libdali.so(dali::ThreadPool::ThreadMain(int, int, bool, std::string const&)+0x1e6) [0x7f510485fe86]
[1,0]<stderr>:[frame 3]: /my-spack/view/._chifflot-v100/44wryknjqgrv67asl5pa7vbcfrxorbcb/lib/python3.10/site-packages/nvidia/dali/libdali.so(+0x769dd0) [0x7f5104e0fdd0]
[1,0]<stderr>:[frame 4]: /lib/x86_64-linux-gnu/libpthread.so.0(+0x7ea7) [0x7f51bae8fea7]
[1,0]<stderr>:[frame 5]: /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f51bac60a2f]
[1,0]<stderr>:
[1,0]<stderr>:Current pipeline object is no longer valid.
Error is triggered here.
Feature Description
I would like to load c8 complex types from a npy file.
A following request for bool here.
Describe your ideal solution
Ideally, I would like to be able to load this file using a numpy reader.
[I will upload a npy file very soon]
Describe any alternatives you have considered
No response
Additional context
No response
Check for duplicates
- I have searched the open bugs/issues and have found no duplicates for this bug report
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.