-
Notifications
You must be signed in to change notification settings - Fork 137
Make useLazyTensor a thread-local state. #387
Conversation
} | ||
} | ||
|
||
private var lazyTensorEnabled: Bool? = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this optional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may not always be set. If this is not set, we should use the global _RuntimeConfig.useLazyTensor
property to determine if lazy tensor is enabled. I added a comment to explain this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, isn't using the global _RuntimeConfig.useLazyTensor
still not thread-safe? Would it make sense to make this flag the only one?
} | ||
} | ||
|
||
private var lazyTensorEnabled: Bool? = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, isn't using the global _RuntimeConfig.useLazyTensor
still not thread-safe? Would it make sense to make this flag the only one?
|
86a891c
to
75cadef
Compare
Also, |
No description provided.