mirror of
https://github.com/pytorch/pytorch.git
synced 2025-11-07 10:01:39 +08:00
Add SourceView which doesn't own source text as base class of Source (#65309)
Summary: This would save the cost copying text from stack to heap in some cases (like parsing function schema during loading phase of libtorch.so) Pull Request resolved: https://github.com/pytorch/pytorch/pull/65309 Reviewed By: swolchok Differential Revision: D31060315 Pulled By: gmagogsfm fbshipit-source-id: 0caf7a688b40df52bb4388c5191d1a42351d6f1a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
bff64e84cd
commit
147f7559b1
@ -5,7 +5,7 @@
|
||||
|
||||
namespace torch {
|
||||
namespace jit {
|
||||
const auto testSource = R"JIT(
|
||||
constexpr c10::string_view testSource = R"JIT(
|
||||
class FooTest:
|
||||
def __init__(self, x):
|
||||
self.x = x
|
||||
|
||||
Reference in New Issue
Block a user