Home
last modified time | relevance | path

Searched refs:source_code (Results 1 – 25 of 84) sorted by relevance

1234

/external/pytorch/torch/_inductor/
Dasync_compile.py183 def triton(self, kernel_name: str, source_code: str, device_str: str = "cuda"):
184 kernel_code_log.info("Triton Kernel:\n%s", source_code)
188 kernel = TritonCodeCache.load(kernel_name, source_code)
212 def cpp(self, source_code: str):
213 kernel_code_log.info("CPP Kernel:\n%s", source_code)
215 return CppCodeCache.load(source_code).kernel
217 get_result = CppCodeCache.load_async(source_code, submit_fn=self.submit)
220 def cpp_pybinding(self, argtypes: List[str], source_code: str):
221 kernel_code_log.info("CPP+Bindings Kernel:\n%s", source_code)
223 return CppPythonBindingsCodeCache.load_pybinding(argtypes, source_code)
[all …]
Dautotune_process.py690 source_code: str,
693 self.source_code = source_code
700 self.hash_key, self.source_file = CUDACodeCache.write(self.source_code, "so")
706 CUDACodeCache.compile(self.source_code, "so")
785 self.source_code, "so"
817 source_code: str,
820 self.source_code = source_code
821 self.hash_key = get_hash(source_code)
828 CppCodeCache.load(self.source_code, cuda=False)
835 self.DLL = CppCodeCache.load(self.source_code, cuda=False)
/external/pytorch/torch/utils/
D_get_clean_triton.py9 def remove_triton_function_declaration(source_code: str) -> str:
10 remove_head = re.sub(r"(\n.+\s\'\'\'\n)", "\n", source_code)
15 def remove_async_compile(source_code: str) -> str:
16 remove_top_level = str.replace(source_code, "async_compile = AsyncCompile()", "")
22 def rename_kernels(source_code: str) -> str:
27 for match in re.finditer(pattern, source_code, re.DOTALL)
33 index_of_B = source_code.find(triton_kernel_decl, end_index)
36 source_code = (
37 source_code[:index_of_B]
39 + source_code[index_of_B + len(triton_kernel_decl) :]
[all …]
/external/rust/android-crates-io/crates/miette-derive/src/
Dsource_code.rs12 source_code: syn::Member, field
44 let source_code = if let Some(ident) = field.ident.clone() { in from_fields_vec() localVariable
53 source_code, in from_fields_vec()
64 let src = &self.source_code; in gen_struct()
77 fn source_code(&self) -> std::option::Option<&dyn miette::SourceCode> { in gen_struct()
88 |ident, fields, DiagnosticConcreteArgs { source_code, .. }| { in gen_enum()
90 source_code.as_ref().and_then(|source_code| { in gen_enum()
91 let field = match &source_code.source_code { in gen_enum()
98 let ret = if source_code.is_option { in gen_enum()
/external/mbedtls/scripts/
Dgenerate_ssl_debug_helpers.py144 def extract(cls, source_code, start=0, end=-1): argument
150 for match in enum_pattern.finditer(source_code, start, end):
151 yield EnumDefinition(source_code,
155 def __init__(self, source_code, span=None, group=None): argument
167 self._source = source_code
233 def extract(cls, source_code, start=0, end=-1): argument
237 matches = list(sig_alg_pattern.finditer(source_code, start, end))
239 yield SignatureAlgorithmDefinition(source_code, definitions=matches)
241 def __init__(self, source_code, definitions=None): argument
246 self._source = source_code
[all …]
/external/openthread/third_party/mbedtls/repo/scripts/
Dgenerate_ssl_debug_helpers.py144 def extract(cls, source_code, start=0, end=-1): argument
150 for match in enum_pattern.finditer(source_code, start, end):
151 yield EnumDefinition(source_code,
155 def __init__(self, source_code, span=None, group=None): argument
167 self._source = source_code
233 def extract(cls, source_code, start=0, end=-1): argument
237 matches = list(sig_alg_pattern.finditer(source_code, start, end))
239 yield SignatureAlgorithmDefinition(source_code, definitions=matches)
241 def __init__(self, source_code, definitions=None): argument
246 self._source = source_code
[all …]
/external/google-fruit/tests/
Dfruit_test_common.py260 def _construct_final_source_code(setup_source_code, source_code, test_params): argument
262 source_code = textwrap.dedent(source_code)
263 source_code = _replace_using_test_params(source_code, test_params)
264 return setup_source_code + source_code
282 source_code, argument
286 source_code = _construct_final_source_code(setup_source_code, source_code, test_params)
288 source_file_name = _create_temporary_file(source_code, file_name_suffix='.cpp')
348 def expect_generic_compile_error(expected_error_regex, setup_source_code, source_code, test_params=… argument
386 expect_compile_error_helper(check_error, setup_source_code, source_code, test_params)
392 source_code, argument
[all …]
/external/emboss/compiler/front_end/
Dglue.py81 self.source_code = None
87 self.source_code == other.source_code)
126 def parse_module_text(source_code, file_name): argument
144 if (source_code, file_name) in _cached_modules:
145 debug_info = _cached_modules[source_code, file_name]
149 debug_info.source_code = source_code
150 tokens, errors = tokenizer.tokenize(source_code, file_name)
163 ir.source_text = source_code
166 _cached_modules[source_code, file_name] = debug_info
191 source_code, errors = file_reader(file_name)
[all …]
Dformat.py91 source_code = f.read()
93 tokens, errors = tokenizer.tokenize(source_code, file_name)
95 _print_errors(errors, {file_name: source_code}, flags)
102 {file_name: source_code},
113 source_code)
Dglue_test.py84 self.assertTrue(debug_info.modules[file_name].source_code)
96 self.assertTrue(debug_info.modules[file_name].source_code)
108 self.assertTrue(debug_info.modules[file_name].source_code)
123 self.assertTrue(debug_info.modules[file_name].source_code)
138 self.assertTrue(debug_info.modules[file_name].source_code)
253 module_info.source_code = "e"
258 self.assertEqual("e", module_info.source_code)
/external/rust/android-crates-io/crates/miette/src/eyreish/
Dwrapper.rs98 fn source_code(&self) -> Option<&dyn miette::SourceCode> { in source_code() method
99 self.0.source_code() in source_code()
141 pub(crate) source_code: C, field
165 fn source_code(&self) -> Option<&dyn miette::SourceCode> { in source_code() method
166 self.error.source_code().or(Some(&self.source_code)) in source_code()
199 fn source_code(&self) -> Option<&dyn miette::SourceCode> { in source_code() method
200 self.error.source_code().or(Some(&self.source_code)) in source_code()
246 pub(crate) source_code: Option<String>, field
254 fn source_code(&self) -> Option<&dyn SourceCode> { in source_code() method
255 self.source_code.as_ref().map(|s| s as _) in source_code()
[all …]
/external/tensorflow/tensorflow/lite/delegates/gpu/gl/compiler/
Dfuse_auto_input.cc131 std::string source_code; in ApplyToNode() local
135 std::swap(source_code, node_code.source_code); in ApplyToNode()
209 attr.code.source_code = in ApplyToNode()
210 absl::StrReplaceAll(attr.code.source_code, replacements); in ApplyToNode()
216 absl::StrAppend(&node_attr.code.source_code, "{\n", attr.code.source_code, in ApplyToNode()
245 node_code.source_code = in ApplyToNode()
246 absl::StrCat(values, node_code.source_code, "{//FUSED", in ApplyToNode()
247 node->operation.type, "\n", source_code, "\n}"); in ApplyToNode()
Dfuse_inplace.cc89 if (!preprocessor.Rewrite(attr.code.source_code, &attr.code.source_code) in ApplyToNode()
123 if (!preprocessor.Rewrite(attr1.code.source_code, &temp).ok()) { in ApplyToNodesSequence()
135 InplaceCodeRewrite rewrite(attr2.code.source_code); in ApplyToNodesSequence()
137 if (!preprocessor.Rewrite(attr1.code.source_code, &attr1.code.source_code) in ApplyToNodesSequence()
Dfuse_inline.cc61 attr1.code.source_code = in ApplyToNodesSequence()
62 absl::StrCat("\n{\n", attr1.code.source_code, "\n}\n"); in ApplyToNodesSequence()
67 absl::StrAppend(&attr1.code.source_code, "{\n", attr2.code.source_code, in ApplyToNodesSequence()
Drename.cc194 std::string source_code; in Rename() local
195 RETURN_IF_ERROR(preprocessor.Rewrite(code->source_code, &source_code)); in Rename()
196 code->source_code = source_code; in Rename()
/external/pytorch/torch/_inductor/codegen/rocm/
Drocm_benchmark_request.py27 source_code: str,
30 self.source_code = source_code
37 self.hash_key, self.source_file = ROCmCodeCache.write(self.source_code, "so")
43 ROCmCodeCache.compile(self.source_code, "so")
124 self.source_code, "so"
/external/python/cpython3/Lib/test/test_importlib/
Dtest_lazy.py47 source_code = 'attr = 42; __name__ = {!r}'.format(mutated_name) variable in TestingImporter
56 exec(self.source_code, module.__dict__)
68 def new_module(self, source_code=None, loader=None): argument
71 if source_code is not None:
72 loader.source_code = source_code
204 module = self.new_module(source_code="""\
/external/ComputeLibrary/src/dynamic_fusion/sketch/gpu/
DGpuKernelComponentStream.cpp43 GpuWorkloadSourceCode source_code; in write_workload_code() local
54 source_code.add_unit_workload(kernel_code, unit_workload_stage, _mem_map); in write_workload_code()
56 return source_code; in write_workload_code()
/external/sdv/vsomeip/third_party/boost/spirit/example/qi/compiler_tutorial/conjure1/
Dmain.cpp48 std::string source_code; // We will read the contents here. in main() local
53 std::back_inserter(source_code)); in main()
56 iterator_type iter = source_code.begin(); in main()
57 iterator_type end = source_code.end(); in main()
/external/tensorflow/tensorflow/lite/delegates/gpu/gl/kernels/
Dsoftmax.cc72 std::string source_code = R"( in GenerateCodeFor1x1() local
159 /*source_code=*/std::move(source_code), in GenerateCodeFor1x1()
174 std::string source_code = R"( in GenerateCodeGeneral() local
207 /*source_code=*/std::move(source_code), in GenerateCodeGeneral()
/external/sdv/vsomeip/third_party/boost/spirit/example/qi/compiler_tutorial/mini_c/
Dmain.cpp48 std::string source_code; // We will read the contents here. in main() local
53 std::back_inserter(source_code)); in main()
56 iterator_type iter = source_code.begin(); in main()
57 iterator_type end = source_code.end(); in main()
/external/sdv/vsomeip/third_party/boost/spirit/example/qi/compiler_tutorial/conjure2/
Dmain.cpp51 std::string source_code; // We will read the contents here. in main() local
56 std::back_inserter(source_code)); in main()
64 base_iterator_type first = source_code.begin(); in main()
65 base_iterator_type last = source_code.end(); in main()
/external/sdv/vsomeip/third_party/boost/spirit/example/qi/compiler_tutorial/conjure3/
Dmain.cpp52 std::string source_code; // We will read the contents here. in main() local
57 std::back_inserter(source_code)); in main()
65 base_iterator_type first = source_code.begin(); in main()
66 base_iterator_type last = source_code.end(); in main()
/external/pytorch/docs/source/scripts/exportdb/
Dgenerate_example_rst.py34 source_code = file.read()
35 source_code = source_code.replace("\n", "\n ")
36 splitted_source_code = re.split(r"@export_rewrite_case.*\n", source_code)
/external/python/cpython3/Lib/test/
Dtest_utf8source.py30 source_code = '# coding: Latin-1\nu = "Ç"\n'.encode("Latin-1")
32 code = compile(source_code, '<dummy>', 'exec')

1234