升级pytorch v1.11.0

This commit is contained in:
xiaxia3
2022-08-11 21:52:29 +08:00
parent eeb8ca89cc
commit df1a2e030f
655 changed files with 12958 additions and 51397 deletions
+10 -10
View File
@@ -981,16 +981,16 @@ def dispatch_lambda_return_str(f: NativeFunction) -> str:
raise RuntimeError(f'{f.func.name} returns unsupported type {return_str}')
return return_str
def cpp_record_func(f: NativeFunction, custom=False) -> str:
name = cpp.name(f.func)
# def cpp_record_func(f: NativeFunction, custom=False) -> str:
# name = cpp.name(f.func)
if Variant.function in f.variants:
if custom:
record_func = f'RECORD_FUNCTION("{name}", std::vector<c10::IValue>({{}}));'
else:
record_func = f'// RECORD_FUNCTION("{name}")'
return record_func
raise RuntimeError(f'could not dispatch, neither function nor method: {f.func}')
# if Variant.function in f.variants:
# if custom:
# record_func = f'RECORD_FUNCTION("{name}", std::vector<c10::IValue>({{}}));'
# else:
# record_func = f'// RECORD_FUNCTION("{name}")'
# return record_func
# raise RuntimeError(f'could not dispatch, neither function nor method: {f.func}')
def cpp_dispatch_target(f: NativeFunction, custom=False) -> str:
name = cpp.name(f.func)
@@ -998,7 +998,7 @@ def cpp_dispatch_target(f: NativeFunction, custom=False) -> str:
return f'self.{name}'
if Variant.function in f.variants:
if custom:
namespace = 'at_npu::native::NPUNativeFunctions'
namespace = 'at_npu::native::XLANativeFunctions'
elif has_tensor_options(f) or f.func.name.name.base.endswith('_like'):
namespace = 'torch'
else: