Achieving true zero-copy with Iceoryx (Shared Memory)
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- numpy, python
調査の方向性
CameraImage_type の構築と writer.write(msg_instance) の経路から始め、提供された IDL を使って memoryview のケースを再現し、約 30 回の呼び出し後に発生する失敗を再現します。完了条件は、大きな画像メッセージがエンコーディングエラーなしに安定して publish され、zero-copy の動作が文書化されているか、実装によって制限されていることです。
索引モデルが issue の本文から書いたものです。
説明
Hi everyone, I've been trying to use this library with CycloneDDS and Iceoryx. I built both libraries from source and can verify everything works from examples & benchmarks.
However, I'm struggling to achieve true zero-copy for large messages (raw images; ~5 MiB/image, 24 Hz). This is my sample IDL:
module TestMessage {
struct CameraImage {
unsigned long width;
unsigned long height;
sequence<octet> image_data;
};
};
Given a numpy array, I can use arr.to_bytes() to publish the message. However, it takes ~350 ms to do so:
msg_instance = CameraImage_type(
width=arr.shape[1],
height=arr.shape[0],
image_data=arr.to_bytes()
)
self.writer.write(msg_instance)
Using np.ascontiguousarray() and memoryview, I can get it down to ~0.1 ms:
contiguous_arr = np.ascontiguousarray(image_np)
c_buffer = memoryview(contiguous_arr.data)
msg_instance = CameraImage_type(
width=contiguous_arr.shape[1],
height=contiguous_arr.shape[0],
image_data=c_buffer
)
self.writer.write(msg_instance)
BUT it quickly fails (~30 calls) with this error:
Failed to encode member image_data, value is <memory at 0x72118cf35990>
I was guessing that Python garbage collection is not in tune with CycloneDDS & Iceoryx. So I tried keeping explicit references to the last 1000 references to both contiguous_arr and c_buffer in a collection.deque() - without success.
Is there another way of making this work?
Best
Fabian
- 主要言語
- Python
- スター
- 110
- フォーク
- 68
- 平均マージ
- 3日 5時間
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
eclipse-cyclonedds/cyclonedds-python のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
-
Generated Python code is not interoperable when a union contains a member called "value"再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
eclipse-cyclonedds/cyclonedds-python#333 · コメント 1 件 ·
eclipse-cyclonedds/cyclonedds-python の issue をすべて見る
似ている issue
-
Edit tool converts CRLF files to LF対応中かも @RaphaelFakhri が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
huggingface/tau#774 ·
メンテナーはふだん 1 日以内に返信
-
show ignores the row limit when a column or table name contains "limit"対応中かも @RaphaelFakhri が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 2 日以内に返信
-
documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
eclipse-score/inc_someip_gateway#356 ·
メンテナーはふだん 2 日以内に返信