This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

  • Resolved

Multi-DSP HEVC encoder hangs.

Hi,

HEVC encoder (1.0.0.44) works good for me on single DSP doing live stream for few days without any issues. But it doesn't work on multiple DSPs - produces wrong HEVC video and hangs after few process calls.

Here you can find logs and output (MPEG-TS stream) of HEVC running on 16 cores:

drive.google.com/.../view

Notes about the implementation:

- I implemented all the synchronization primitives reqested throug multicore API and required for multi-DSP algorithm
- I tested all the shared between both DSPs buffers - they really point to the same memory but addresses on different DSPs are different because of different OB registers usage.
- Output buffer is also the same shared between both DSPs.
- In logs you can see all keyCreate callbacks and their results.
- In logs you can see beginning of each process call: process inputID=1 outBuf=@64b9cbc4
- In logs you can see all shm sync callbacks.
- In logs you can see all read and write mailbox callbacks.

Questions:

1) Do you see any problems that cause the hang of encoder?
2) Why there is no shm sync callbacks that sync shared between DSP memory (DDR_CACHED)?
3) Mailbox write initates interrupt on another DSP. This interrupt callback terminates execution of process call task on aonther DSP and queries\reads mailboxes. Is any additional synchronization between process call taks and interrupt callback required?

Regards,
Andrey Lisnevich

  • In reply to Palachandra Venkataraju:

    Thanks Palachandra,

    My fault. Wrong DSP numbers in my previous post. Should be:

    DSP0:
    keyCreate shmem name=shared_mem_CABAC_Context03 user_id=0 num_users=2 user_ids=0,24 type=DDR_CACHED size=1600 alignment=128

    DSP1:
    keyCreate shmem name=shared_mem_CABAC_Context03 user_id=8 num_users=2 user_ids=8,16 type=DDR_CACHED size=1600 alignment=128

    Of course user_id=0 means first DSP first core and user_id=8 means next DSP first core. So problem with key naming exists.

    Regards,
    Andrey Lisnevich
  • In reply to Andrey Lisnevich:

    Hi Andrey,

    Please find my findings inline:

    Query 1 : Conflicts in names of multi-DSP keys :

    [Palachandra] :

    - We are not observing issue with conflicts in names of multi-DSP keys.

    - I have made minor modifications in naming keys to resolve the naming conflict for multi-DSP Keys

    - Keys used for data sharing in Inter-chip communication share same key name.

    When I run the encoder in 4 chip configuration without tiles (Considering modifications in naming keys), I observe that

    - Memory allocation in forward direction in one chip is virtually same as memory allocation in backward direction in next chip, hence they share same name.

    - Apart from this, all keys allocated on different chips have unique names.



    Memory Allocations in Forward Direction:

    DSP0:
    keyCreate shmem name=shared_mem_CABAC_Context00 user_id=0 num_users=2 user_ids=0,8 type=DDR_CACHED size=1600 alignment=128

    DSP1:
    keyCreate shmem name=shared_mem_CABAC_Context01 user_id=8 num_users=2 user_ids=8,16 type=DDR_CACHED size=1600 alignment=128

    DSP2:
    keyCreate shmem name=shared_mem_CABAC_Context02 user_id=0 num_users=2 user_ids=16,24 type=DDR_CACHED size=1600 alignment=128

    DSP3:
    keyCreate shmem name=shared_mem_CABAC_Context03 user_id=8 num_users=2 user_ids=0,24 type=DDR_CACHED size=1600 alignment=128



    Memory Allocations in Backward Direction:


    DSP1:
    keyCreate shmem name=shared_mem_CABAC_Context00 user_id=8 num_users=2 user_ids=0,8 type=DDR_CACHED size=1600 alignment=128
    (Virtually same location as DSP0 Forward Allocation)

    DSP2:
    keyCreate shmem name=shared_mem_CABAC_Context01 user_id=0 num_users=2 user_ids=8,16 type=DDR_CACHED size=1600 alignment=128
    (Virtually same location as DSP1 Forward Allocation)

    DSP3:
    keyCreate shmem name=shared_mem_CABAC_Context02 user_id=8 num_users=2 user_ids=16,24 type=DDR_CACHED size=1600 alignment=128
    (Virtually same location as DSP2 Forward Allocation)

    DSP0:
    keyCreate shmem name=shared_mem_CABAC_Context03 user_id=0 num_users=2 user_ids=0,24 type=DDR_CACHED size=1600 alignment=128
    (Virtually same location as DSP3 Forward Allocation)


    - I have attached the updated library

    - Can you please check whether conflicts due to naming of multi-DSP Keys is resolved.

    0334.h265venc_ti.7z


    Thanks and Regards,

    Palachandra M V

  • In reply to Palachandra Venkataraju:

    Hi Andrey,

    Can you please let us know whether the changes in the updated library has resolved the conflict in names of multi-DSP keys.

    Regards
    Palachandra M V
  • In reply to Palachandra Venkataraju:

    Thanks! It solved my issues.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.