microsoft / onnxruntime

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
https://onnxruntime.ai
MIT License
14.78k stars 2.94k forks source link

Adjust the memory ordering settings in stream_execution_context.h #22772

Open snnn opened 2 weeks ago

snnn commented 2 weeks ago

Description

std::memory_order_relaxed means no memory barrier at all, which is good for x86 CPUs, but not the others. Especially, ARM.

Motivation and Context

snnn commented 2 weeks ago

@ranjitshs /@goldsteinn, FYI.

goldsteinn commented 2 weeks ago

Ah nice :) Orderings all seem sensible, did this solve the issue?

snnn commented 2 weeks ago

did this solve the issue?

Unfortunately, no.

goldsteinn commented 2 weeks ago

did this solve the issue?

Unfortunately, no.

Hmm, did anything particular make you think this area is responsible or just a hunch?