I find a case that may can't solve your problem, but it can still be provided to discuss:
i use a mode "damo/nlp_csanmt_translation_en2zh" to translate english to chinese, it is used tensorflow gpu, but it also use torch, so you shouldn't install torch gpu version, because i guess tensorflow and pytorch can't both occupy the gpu, so if torch run later, it will detect gpu is occupied, it give this shm.dll error, "shared gpu memory error?"
how to solve?
i use pip install torch
(this a cpu torch, choose one), it is finally solved