{"entries":[{"file_sha256":"d76b4cb1e888697d5f011a939e68cbc6230647c4d457c12d22689740aa43a44d","kind":"documentation_input","lines":"14-32","path":"docs/spec-compiler-part-3-dfg.md","roles":["context","applicability"],"text":"The target Part 3 dataflow surface uses module-scope, Symbol-bearing,\nfunction-like definitions for both `dataflow.thread` and\n`dataflow.graph`. Execution is materialized only by\n`dataflow.thread.launch` and `dataflow.graph.launch`. Graph control\nports are explicit in the current graph ABI: `ctrl_in` and launch-facing\n`done_out` are invocation protocol endpoints represented at every launch\nsite, not application payload slots in the `dataflow.graph` function type.\nThe graph body does not return `done_out`; its structural\n`dataflow.graph.return.complete` frontier is the unique authority from which\nthe launch result is derived. Part 3 consumes each explicit\n`loom.spatial_region` inside its owning `dataflow.thread` and publishes the\ncorresponding graph definition and launch only after complete conversion and\nnative finalization succeed.\nThe precise timing semantics of `dataflow.stream`, `dataflow.carry`,\n`dataflow.invariant`, and `dataflow.gate` are specified separately in\n`docs/spec-dataflow-part-1-streaming.md`. The precise firing semantics\nof `dataflow.constant`, `dataflow.sync`, `dataflow.mux`, and\n`dataflow.demux` are specified separately in\n`docs/spec-dataflow-part-2-control.md`.","why":"Governing context of the sampled obligation: module-scope, Symbol-bearing, function-like dataflow.thread and dataflow.graph definitions, launch-only execution, and the fact that Part 3 consumes each explicit loom.spatial_region inside its owning dataflow.thread. Fixes which outputs the claim governs and which stage must run."},{"file_sha256":"d76b4cb1e888697d5f011a939e68cbc6230647c4d457c12d22689740aa43a44d","kind":"documentation_input","lines":"462-465","path":"docs/spec-compiler-part-3-dfg.md","roles":["input_construction","input_well_formedness"],"text":"* `loom.spatial_region` is temporary compiler IR inside a\n `dataflow.thread`. It owns one structured graph candidate with normalized\n value, stream-channel, and memory boundary segments. It never appears in a\n finalized Canonical Dataflow Program.","why":"loom.spatial_region is temporary IR inside a dataflow.thread owning one structured graph candidate with normalized value, stream-channel, and memory boundary segments; determines the sampled input construct and its placement."},{"file_sha256":"d76b4cb1e888697d5f011a939e68cbc6230647c4d457c12d22689740aa43a44d","kind":"documentation_input","lines":"499-506","path":"docs/spec-compiler-part-3-dfg.md","roles":["input_well_formedness"],"text":"`llvm.func` or `func.func` definitions. An `llvm.call` or `func.call` inside a\n`dataflow.thread` definition's body is an InstructionCore call. If the callee\ncontains code that must become a `dataflow.graph` definition, Part 3 must\ninline or specialize that callee into the active thread definition\nbefore graph extraction. A `dataflow.thread.launch` is invalid\ntransitively inside every thread or graph definition. Non-inlined\nInstructionCore calls may remain only when their callee body is graph-free\nafter this preparation.","why":"InstructionCore call rules: a dataflow.thread.launch is invalid transitively inside a thread or graph definition and graph-bearing callees must be inlined; justifies sampling self-contained thread bodies with no calls and no nested launches."},{"file_sha256":"d76b4cb1e888697d5f011a939e68cbc6230647c4d457c12d22689740aa43a44d","kind":"documentation_input","lines":"564-574","path":"docs/spec-compiler-part-3-dfg.md","roles":["input_construction","input_well_formedness"],"text":"6. `loom.spatial_region` is the temporary publication boundary inside an\n existing `dataflow.thread`. Its operands are normalized as value inputs,\n stream input channels, memory inputs, and stream output channels; its\n results are value outputs followed by memory outputs. Each stream input\n has one affine `source_map` from the consumer thread domain to the producer\n thread domain. The lowering collects all explicit candidates before\n attempting publication, performs conversion and native validation on a\n scratch module, and replaces the live module only on success. A public pass\n failure therefore leaves temporary candidates and never exposes a partial\n canonical graph. Current publication supports nested `scf.if` completion\n propagation. Stream channel segments become payload-typed graph stream","why":"Normalized operand segmentation (value inputs, stream inputs, memory inputs, stream outputs; value then memory results) and affine source_map requirement for stream inputs, plus the statement that nested scf.if completion propagation is supported. Drives the sampled operandSegmentSizes/resultSegmentSizes shapes, the empty source_maps for stream-free candidates, and the scf.for/scf.if nesting choices."},{"file_sha256":"d76b4cb1e888697d5f011a939e68cbc6230647c4d457c12d22689740aa43a44d","kind":"documentation_input","lines":"578-582,591-601","path":"docs/spec-compiler-part-3-dfg.md","roles":["input_construction","input_well_formedness"],"text":"enter the canonical graph body. One binding denotes one ordered dynamic\n event sequence. A fixed structured scope may contain multiple sequential\n or structured mutually exclusive sites. Lowering emits one fixed ordinal\n schedule, filters inactive branch sites, demuxes each input from the\n filtered ordinal, and muxes outputs back into that same dynamic order.\n Branches may have unequal or empty site sets, and a later branch selector\n may depend on an earlier input event. Enclosing loops repeatedly activate\n the same schedule, so one or several static body sites may each fire\n dynamically. Across repeated thread launches, each endpoint binding and\n logical point concatenates these per-instance sequences in deterministic\n launch issue order. Channel delivery pairs the resulting producer and\n consumer sequences by message ordinal after applying `source_map`; it does\n not pair thread activations or create activation-owned segments. Endpoint\n sites nested under `scf.parallel` or `scf.forall` have no inferred\n traversal order and fail before publication. Unselected or non-fixed\n graph-owned parallel forms also fail closed.","why":"Fixed ordinal schedule, sequential and mutually exclusive sites inside a structured scope, enclosing loops repeatedly activating the schedule, and the closure that endpoint sites under scf.parallel or scf.forall fail before publication. Motivates sampling fixed scf.for and nested scf.if site placement and excluding scf.parallel/scf.forall endpoint sites."},{"file_sha256":"d76b4cb1e888697d5f011a939e68cbc6230647c4d457c12d22689740aa43a44d","kind":"documentation_input","lines":"1413-1419","path":"docs/spec-compiler-part-3-dfg.md","roles":["input_well_formedness"],"text":"* `loom.spatial_region` is a transparent structured boundary. A blocking\n receive inside that region cannot be justified by a send that follows the\n region in the same stored-program strand merely because the published graph\n launch becomes asynchronous. Such a transformation would turn an\n inline-semantics deadlock into progress. A resulting retirement/send cycle\n therefore identifies a deadlocking or incorrectly cut candidate; lowering\n must not remove a wait by inventing a same-activation channel witness.","why":"A blocking receive inside the region that would need a post-region send is a deadlocking/incorrectly cut candidate; justifies sampling only channel-free region bodies so that no seed is an intentionally rejected candidate."},{"file_sha256":"73f239de628bbf8d40145ecde732142ffcf6567c9483e6dc2286ae9176a6907c","kind":"language_definition","lines":"8-103","path":"include/Frontend/IR/LoomOps.td","roles":["input_construction","input_well_formedness"],"text":"def Loom_SpatialRegionOp : Loom_Op<\"spatial_region\", [\n IsolatedFromAbove,\n SingleBlock,\n AttrSizedOperandSegments,\n AttrSizedResultSegments,\n RecursiveMemoryEffects\n]> {\n let summary = \"Structured candidate for one SpatialCore graph\";\n let description = [{\n Holds one structured candidate inside a `dataflow.thread`. Operands are\n normalized as value inputs, stream input channels, memory inputs, and\n stream output channels. Results are normalized as value outputs followed\n by memory outputs. Each stream input has one affine `source_map`.\n\n This operation is temporary compiler IR. Successful publication replaces\n it with one native-valid `dataflow.graph` and its matching launch.\n }];\n\n let arguments = (ins\n Variadic:$valueInputs,\n Variadic:$streamInputs,\n Variadic:$memoryInputs,\n Variadic:$streamOutputs,\n AffineMapArrayAttr:$source_maps,\n OptionalAttr:$graph_name);\n\n let results = (outs\n Variadic:$valueResults,\n Variadic:$memoryResults);\n\n let regions = (region AnyRegion:$body);\n\n let skipDefaultBuilders = 1;\n let builders = [\n OpBuilder<(ins\n \"::mlir::ValueRange\":$valueInputs,\n \"::mlir::ValueRange\":$streamInputs,\n \"::mlir::ValueRange\":$memoryInputs,\n \"::mlir::ValueRange\":$streamOutputs,\n \"::mlir::TypeRange\":$valueResultTypes,\n \"::mlir::TypeRange\":$memoryResultTypes,\n \"::mlir::ArrayAttr\":$sourceMaps,\n CArg<\"::mlir::StringAttr\", \"{}\">:$graphName), [{\n $_state.addOperands(valueInputs);\n $_state.addOperands(streamInputs);\n $_state.addOperands(memoryInputs);\n $_state.addOperands(streamOutputs);\n $_state.addTypes(valueResultTypes);\n $_state.addTypes(memoryResultTypes);\n $_state.addAttribute(\"source_maps\", sourceMaps);\n if (graphName)\n $_state.addAttribute(\"graph_name\", graphName);\n auto &properties = $_state.getOrAddProperties();\n properties.operandSegmentSizes = {\n static_cast(valueInputs.size()),\n static_cast(streamInputs.size()),\n static_cast(memoryInputs.size()),\n static_cast(streamOutputs.size())};\n properties.resultSegmentSizes = {\n static_cast(valueResultTypes.size()),\n static_cast(memoryResultTypes.size())};\n $_state.addRegion();\n }]>\n ];\n\n let hasVerifier = 1;\n}\n\ndef Loom_SpatialYieldOp : Loom_Op<\"spatial_yield\", [\n Terminator,\n ParentOneOf<[\"::loom::SpatialRegionOp\"]>,\n AttrSizedOperandSegments,\n Pure\n]> {\n let summary = \"Yield value and memory results from a spatial candidate\";\n\n let arguments = (ins\n Variadic:$values,\n Variadic:$memories);\n\n let skipDefaultBuilders = 1;\n let builders = [\n OpBuilder<(ins\n \"::mlir::ValueRange\":$values,\n \"::mlir::ValueRange\":$memories), [{\n $_state.addOperands(values);\n $_state.addOperands(memories);\n auto &properties = $_state.getOrAddProperties();\n properties.operandSegmentSizes = {\n static_cast(values.size()),\n static_cast(memories.size())};\n }]>\n ];\n\n let hasVerifier = 1;\n}","why":"ODS for loom.spatial_region and loom.spatial_yield: operand/result ordering, AttrSizedOperandSegments/AttrSizedResultSegments properties, source_maps and graph_name attributes, single-block isolated body. Fixes the exact generic-form spelling emitted by the grammar."},{"file_sha256":"f4e60b2e62b496c3714437bd100ab5236540abebd3685dfbd25eeddb37cb7160","kind":"language_definition","lines":"614-678","path":"include/Dataflow/IR/DataflowOps.td","roles":["input_construction","input_well_formedness"],"text":"def Dataflow_ThreadOp : Dataflow_Op<\"thread\", [\n AutomaticAllocationScope,\n IsolatedFromAbove,\n HasParent<\"::mlir::ModuleOp\">,\n SingleBlockImplicitTerminator<\"ThreadYieldOp\">,\n FunctionOpInterface,\n RecursiveMemoryEffects\n]> {\n let summary = \"Symbol-bearing function-like AccCore kernel definition\";\n let description = [{\n Module-scope, function-like callable that holds an AccCore kernel\n body. It does not itself execute; one or more\n `dataflow.thread.launch` ops materialize launches of it.\n\n The body's entry block has the layout\n `(args_*, thread_ctrl: none, iv_*: index)` (per spec section\n 5.4.1). The first N block args mirror `function_type.inputs`; the\n trailing `thread_ctrl` and grid index args are NOT in\n `function_type` (they are launch-instance extras). Specifically:\n\n * Args[0 .. N-1] match `function_type.inputs` position-wise.\n * Args[N] is `none` -- the per-launch `thread_ctrl`\n slot, used as the AccCore start signal and\n consumed by root `dataflow.graph.launch` ops\n in the body as a dependency event.\n * Args[N+1 .. end] are all `index` -- one per grid dim.\n\n The custom assembly format prints the required `domain(...)` immediately\n after the symbol and the trailing extras after the function-style\n signature using a separate `ctrl ( ... )` clause\n (the `thread_ctrl` slot) and an `iv ( ... )` clause (the\n grid-index slots). Either / both clauses are optional; threads\n written without them are accepted at parse time only when the op\n is external (i.e., body is empty), since a body-having thread\n must carry the trailing `thread_ctrl` slot per the verifier.\n\n The op is `IsolatedFromAbove`; values flow in only through the\n matching `dataflow.thread.launch` body operands.\n\n Every definition carries one closed `domain`: DenseRectangular or\n DynamicWork. Dense rank is derived solely from the trailing index block\n arguments. DynamicWork carries one ordinary function-input ordinal and has\n no coordinate suffix.\n }];\n\n let arguments = (ins\n SymbolNameAttr:$sym_name,\n TypeAttrOf:$function_type,\n Dataflow_ThreadDomainAttr:$domain,\n OptionalAttr:$sym_visibility,\n OptionalAttr:$arg_attrs,\n OptionalAttr:$res_attrs);\n\n let regions = (region SizedRegion<1>:$body);\n\n let hasCustomAssemblyFormat = 1;\n let hasVerifier = 1;\n\n let builders = [\n OpBuilder<(ins\n \"::llvm::StringRef\":$name,\n \"::mlir::FunctionType\":$type,\n \"::dataflow::ThreadDomainAttr\":$domain,\n CArg<\"::llvm::ArrayRef<::mlir::NamedAttribute>\", \"{}\">:$attrs)>\n ];","why":"ODS and assembly description for dataflow.thread: HasParent ModuleOp, sym_name/function_type/domain attributes, and the (args_*, thread_ctrl: none, iv_*) entry-block layout with the required ctrl clause for a body-having thread. Fixes the sampled thread header and also the concrete attribute names read by the postcondition."},{"file_sha256":"f4e60b2e62b496c3714437bd100ab5236540abebd3685dfbd25eeddb37cb7160","kind":"verifier","lines":"839-922","path":"include/Dataflow/IR/DataflowOps.td","roles":["context"],"text":"def Dataflow_GraphOp : Dataflow_Op<\"graph\", [\n IsolatedFromAbove,\n HasParent<\"::mlir::ModuleOp\">,\n SingleBlockImplicitTerminator<\"GraphReturnOp\">,\n FunctionOpInterface,\n RecursiveMemoryEffects,\n DeclareOpInterfaceMethods\n]> {\n let summary = \"Symbol-bearing function-like SpatialCore graph definition\";\n let description = [{\n Module-scope, function-like callable holding the SpatialCore body\n of a leaf dataflow graph. It does not itself execute; one or more\n `dataflow.graph.launch` ops materialise launches of it inside the\n body of a `dataflow.thread` definition.\n\n `function_type` contains only application payload ports. Normalized\n `input_segments` and `result_segments` classify those payloads as value,\n stream, and memory ports. The body's distinguished leading `none` block\n argument is the invocation start protocol endpoint, while launch `done`\n is derived exclusively from `dataflow.graph.return.complete`; neither is\n stored in the function type.\n\n This is the only canonical graph definition surface.\n }];\n\n let arguments = (ins\n SymbolNameAttr:$sym_name,\n TypeAttrOf:$function_type,\n DenseI32ArrayAttr:$input_segments,\n DenseI32ArrayAttr:$result_segments,\n OptionalAttr:$sym_visibility,\n OptionalAttr:$arg_attrs,\n OptionalAttr:$res_attrs);\n\n let regions = (region SizedRegion<1>:$body);\n\n let hasCustomAssemblyFormat = 1;\n let hasVerifier = 1;\n\n let builders = [\n OpBuilder<(ins\n \"::llvm::StringRef\":$name,\n \"::mlir::FunctionType\":$type,\n CArg<\"::llvm::ArrayRef<::mlir::NamedAttribute>\", \"{}\">:$attrs)>\n ];\n\n let extraClassDeclaration = [{\n /// FunctionOpInterface methods.\n ::llvm::ArrayRef<::mlir::Type> getArgumentTypes() {\n return getFunctionType().getInputs();\n }\n ::llvm::ArrayRef<::mlir::Type> getResultTypes() {\n return getFunctionType().getResults();\n }\n ::mlir::Region *getCallableRegion() {\n return isExternal() ? nullptr : &getBody();\n }\n bool isExternal() { return getBody().empty(); }\n ::mlir::BlockArgument getStart();\n ::llvm::ArrayRef getInputSegmentSizes();\n ::llvm::ArrayRef getResultSegmentSizes();\n GraphPortKind getInputPortKind(unsigned index);\n GraphPortKind getResultPortKind(unsigned index);\n ::llvm::LogicalResult verifyBody() {\n if (isExternal())\n return ::mlir::success();\n ::mlir::Block &entry = getBody().front();\n ::llvm::ArrayRef<::mlir::Type> inputs = getFunctionType().getInputs();\n if (entry.getNumArguments() != inputs.size() + 1)\n return emitOpError(\"entry block must have one start argument plus \")\n << inputs.size() << \" application inputs\";\n if (!::llvm::isa<::mlir::NoneType>(entry.getArgument(0).getType()))\n return emitOpError(\"entry block argument #0 must be start type none\");\n for (size_t i = 0, e = inputs.size(); i < e; ++i) {\n if (entry.getArgument(i + 1).getType() != inputs[i])\n return emitOpError(\"entry block argument #\")\n << (i + 1) << \" type \"\n << entry.getArgument(i + 1).getType()\n << \" must match function input type \" << inputs[i];\n }\n return ::mlir::success();\n }\n }];\n}","why":"dataflow.graph ODS and verifyBody: module-scope parent, sym_name and function_type attributes on the published definition; confirms the attribute spelling used to test Symbol-bearing, function-like, module-scope definitions in the output."},{"file_sha256":"f4e60b2e62b496c3714437bd100ab5236540abebd3685dfbd25eeddb37cb7160","kind":"language_definition","lines":"767-820,973-1008","path":"include/Dataflow/IR/DataflowOps.td","roles":["context"],"text":"def Dataflow_ThreadLaunchOp : Dataflow_Op<\"thread.launch\", [\n AttrSizedOperandSegments,\n DeclareOpInterfaceMethods\n]> {\n let summary = \"Async launch of a dataflow.thread callable\";\n let description = [{\n References a `dataflow.thread` definition by symbol and supplies\n body operands and optional grid upper bounds. Always produces one\n `!dataflow.thread_token` completion handle for all dynamic launch\n instances.\n\n Grid lower bounds and steps are not modeled; body operands, upper bounds,\n and async dependencies are explicit.\n }];\n\n let arguments = (ins\n FlatSymbolRefAttr:$callee,\n Variadic:$bodyOperands,\n Variadic:$gridUpperBounds,\n Variadic:$asyncDependencies);\n\n let results = (outs Dataflow_ThreadTokenType:$asyncToken);\n\n let assemblyFormat = [{\n $callee\n `(` $bodyOperands `)`\n ( `grid` `(` $gridUpperBounds^ `)` )?\n ( `wait` `(` $asyncDependencies^ `)` )?\n attr-dict `:`\n functional-type($bodyOperands, results)\n }];\n\n let skipDefaultBuilders = 1;\n let builders = [\n OpBuilder<(ins\n \"::mlir::FlatSymbolRefAttr\":$callee,\n \"::mlir::ValueRange\":$bodyOperands,\n \"::mlir::ValueRange\":$gridUpperBounds,\n \"::mlir::ValueRange\":$asyncDependencies), [{\n $_state.addOperands(bodyOperands);\n $_state.addOperands(gridUpperBounds);\n $_state.addOperands(asyncDependencies);\n auto &properties = $_state.getOrAddProperties();\n properties.operandSegmentSizes = {\n static_cast(bodyOperands.size()),\n static_cast(gridUpperBounds.size()),\n static_cast(asyncDependencies.size())};\n properties.callee = callee;\n $_state.addTypes(::dataflow::ThreadTokenType::get($_builder.getContext()));\n }]>\n ];\n\n let hasVerifier = 1;\n}\ndef Dataflow_GraphLaunchOp : Dataflow_Op<\"graph.launch\", [\n AttrSizedOperandSegments,\n AttrSizedResultSegments,\n DeclareOpInterfaceMethods\n]> {\n let summary = \"Asynchronous launch of a dataflow.graph callable\";\n let description = [{\n References a `dataflow.graph` definition by symbol from inside a\n `dataflow.thread` body. Dependencies, value inputs, stream input channel\n bindings, memory imports, and stream output channel bindings are explicit\n operand segments. Each stream input binding carries one affine\n `source_map` from the enclosing consumer thread domain to its producer\n domain. Value outputs and memory exports are SSA results; the trailing\n `done` result is the graph retirement event.\n\n The operation resolves its callee through `SymbolUserOpInterface` but does\n not project callee effects through `MemoryEffectsOpInterface`.\n }];\n\n let arguments = (ins\n FlatSymbolRefAttr:$callee,\n AffineMapArrayAttr:$source_maps,\n Variadic:$dependencies,\n Variadic:$valueInputs,\n Variadic:$streamInputs,\n Variadic:$memoryInputs,\n Variadic:$streamOutputs);\n\n let results = (outs\n Variadic:$valueResults,\n Variadic:$memoryResults,\n NoneType:$done);\n\n let hasCustomAssemblyFormat = 1;\n let hasVerifier = 1;\n}","why":"dataflow.thread.launch and dataflow.graph.launch carry a FlatSymbolRefAttr callee resolved through SymbolUserOpInterface; establishes that symbol users of a thread or graph definition are identified by the callee attribute, which the postcondition uses to test launch-only execution."},{"file_sha256":"c25a72ad99349973a47f2a1e081b6b269920e25cc5f59f74619c2e7ce0c2b65d","kind":"test","lines":"22-52","path":"test/raise/scf-to-dfg-explicit-spatial-ownership.mlir","roles":["input_construction"],"text":"func.func @host_container(%target: memref<4xi32>, %value: i32) {\n %zero = arith.constant 0 : index\n %four = arith.constant 4 : index\n %one = arith.constant 1 : index\n scf.for %index = %zero to %four step %one {\n memref.store %value, %target[%index] : memref<4xi32>\n }\n return\n}\n\ndataflow.thread private @instruction_only domain(#dataflow.thread_domain)(\n %target: memref<1xi32>, %value: i32) ctrl (%ctrl: none) {\n %zero = arith.constant 0 : index\n memref.store %value, %target[%zero] : memref<1xi32>\n dataflow.thread.yield\n}\n\ndataflow.thread private @selected_spatial domain(#dataflow.thread_domain)(\n %target: memref<1xi32>, %value: i32) ctrl (%ctrl: none) {\n \"loom.spatial_region\"(%value, %target)\n <{operandSegmentSizes = array,\n resultSegmentSizes = array}> ({\n ^bb0(%payload: i32, %memory: memref<1xi32>):\n %zero = arith.constant 0 : index\n memref.store %payload, %memory[%zero] : memref<1xi32>\n \"loom.spatial_yield\"()\n <{operandSegmentSizes = array}> : () -> ()\n }) {graph_name = \"selected_graph\", source_maps = []} :\n (i32, memref<1xi32>) -> ()\n dataflow.thread.yield\n}","why":"Accepted concrete spelling of a module holding a host func.func plus dataflow.thread definitions with an explicit loom.spatial_region (memory + value operand segments, graph_name, empty source_maps) under --loom-lower-for-to-graph."},{"file_sha256":"df76d22d1149cf2929b700df6f97b58d27b64d523346cfbb4dbf9ba8e66baa49","kind":"test","lines":"60-152","path":"test/raise/scf-to-dfg-nested-completion.mlir","roles":["input_construction"],"text":"//--- supported.mlir\nmodule {\n dataflow.thread private @for_completion domain(#dataflow.thread_domain)(%limit: index, %enabled: i1)\n ctrl (%start: none) {\n %c0 = arith.constant 0 : index\n %c1 = arith.constant 1 : index\n scf.for %i = %c0 to %limit step %c1 {\n scf.if %enabled {\n \"loom.spatial_region\"()\n <{operandSegmentSizes = array,\n resultSegmentSizes = array}> ({\n ^bb0:\n \"loom.spatial_yield\"()\n <{operandSegmentSizes = array}> : () -> ()\n }) {graph_name = \"for_graph\", source_maps = []} : () -> ()\n }\n }\n dataflow.thread.yield\n }\n\n dataflow.thread private @while_completion domain(#dataflow.thread_domain)(%continue: i1)\n ctrl (%start: none) {\n scf.while : () -> () {\n \"loom.spatial_region\"()\n <{operandSegmentSizes = array,\n resultSegmentSizes = array}> ({\n ^bb0:\n \"loom.spatial_yield\"()\n <{operandSegmentSizes = array}> : () -> ()\n }) {graph_name = \"while_before_graph\", source_maps = []} : () -> ()\n scf.condition(%continue)\n } do {\n \"loom.spatial_region\"()\n <{operandSegmentSizes = array,\n resultSegmentSizes = array}> ({\n ^bb0:\n \"loom.spatial_yield\"()\n <{operandSegmentSizes = array}> : () -> ()\n }) {graph_name = \"while_after_graph\", source_maps = []} : () -> ()\n scf.yield\n }\n dataflow.thread.yield\n }\n\n dataflow.thread private @switch_completion domain(#dataflow.thread_domain)(%selector: index)\n ctrl (%start: none) {\n scf.index_switch %selector\n case 7 {\n \"loom.spatial_region\"()\n <{operandSegmentSizes = array,\n resultSegmentSizes = array}> ({\n ^bb0:\n \"loom.spatial_yield\"()\n <{operandSegmentSizes = array}> : () -> ()\n }) {graph_name = \"switch_graph\", source_maps = []} : () -> ()\n scf.yield\n }\n default {\n scf.yield\n }\n dataflow.thread.yield\n }\n\n dataflow.thread private @parallel_completion domain(#dataflow.thread_domain)() ctrl (%start: none) {\n %c0 = arith.constant 0 : index\n %c1 = arith.constant 1 : index\n %c2 = arith.constant 2 : index\n scf.parallel (%i) = (%c0) to (%c2) step (%c1) {\n \"loom.spatial_region\"()\n <{operandSegmentSizes = array,\n resultSegmentSizes = array}> ({\n ^bb0:\n \"loom.spatial_yield\"()\n <{operandSegmentSizes = array}> : () -> ()\n }) {graph_name = \"parallel_graph\", source_maps = []} : () -> ()\n scf.reduce\n }\n dataflow.thread.yield\n }\n\n dataflow.thread private @forall_completion domain(#dataflow.thread_domain)() ctrl (%start: none) {\n scf.forall (%i) in (2) {\n \"loom.spatial_region\"()\n <{operandSegmentSizes = array,\n resultSegmentSizes = array}> ({\n ^bb0:\n \"loom.spatial_yield\"()\n <{operandSegmentSizes = array}> : () -> ()\n }) {graph_name = \"forall_graph\", source_maps = []} : () -> ()\n }\n dataflow.thread.yield\n }\n}","why":"Accepted spellings of spatial-region sites nested inside scf.for and scf.if within a dataflow.thread body, including the empty-segment region form; used for the loop/branch site shapes sampled by the grammar."}],"primary_bundle_sha256":"0523bfa5e1bae819d54eed855903f63b0474238d82999c3e8e1a6fe2b0f637a2","project":"PolyArch/loom","revision":"48615bc5925ef4b9db8b4550b5d4322933cf4b7b","schema":"spectriad.authoring-context/v1","selection_sha256":"d4ccd27b494b510a15c7e6a9d70a66ff6a9d47ed221e33ead426beccbaebbc0e"}