Skip to content

Commit

Permalink
add thread_local for norm registry instance
Browse files Browse the repository at this point in the history
Signed-off-by: Phuong Nguyen <[email protected]>
  • Loading branch information
phu0ngng committed Dec 11, 2024
1 parent a149fb0 commit 26ba7be
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions transformer_engine/common/normalization/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,8 @@ class CudnnNormalizationPlan : public NormalizationPlanBase {

class NormalizationPlanRegistry {
public:
// TODO thread-safe
static NormalizationPlanRegistry& getInstance() {
static NormalizationPlanRegistry instance;
static thread_local NormalizationPlanRegistry instance;
return instance;
}

Expand Down

0 comments on commit 26ba7be

Please sign in to comment.