gpu: also add synchronization after writes to shared memory from core