mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
MAINT: char class regex simplify (#50294)
Summary: * remove some cases of single characters in character classes--these can incur the overhead of a character class with none of the benefits of a multi-character character class * for more details, see Chapter 6 of: Friedl, Jeffrey. Mastering Regular Expressions. 3rd ed., O’Reilly Media, 2009. Pull Request resolved: https://github.com/pytorch/pytorch/pull/50294 Reviewed By: zhangguanheng66 Differential Revision: D25870912 Pulled By: malfet fbshipit-source-id: 9be5be9ed11fd49876213f0be8121b24739f1c13
This commit is contained in:
committed by
Facebook GitHub Bot
parent
664126bab5
commit
4a2d3d1cfd
@ -459,7 +459,7 @@ def replace_math_functions(input_string):
|
||||
return output_string
|
||||
|
||||
|
||||
RE_SYNCTHREADS = re.compile(r"[:]?[:]?\b(__syncthreads)\b(\w*\()")
|
||||
RE_SYNCTHREADS = re.compile(r":?:?\b(__syncthreads)\b(\w*\()")
|
||||
|
||||
|
||||
def hip_header_magic(input_string):
|
||||
|
Reference in New Issue
Block a user