{"id":"compute.graph--portableComputeGraph","name":"portableComputeGraph","owner":"yeho","package":"compute.graph","kind":"thing","signature":"external thing portableComputeGraph","description":"A portable compute graph record carrying name, values, nodes, outputValues, eagerParityRequired, and related state.","context":"Describe compute work as an explicit graph with package-owned validation and scheduling metadata.","parameters":[],"returns":"void","members":[{"name":"name","kind":"field","type":"text","description":"Stores name as text.","signature":"text name","tags":["thing","field","compute.graph"],"updated":"2026-09-09"},{"name":"values","kind":"field","type":"list of portableGraphValue","description":"Stores values as list of portableGraphValue.","signature":"list of portableGraphValue values","tags":["thing","field","compute.graph"],"updated":"2026-09-09"},{"name":"nodes","kind":"field","type":"list of portableGraphNode","description":"Stores nodes as list of portableGraphNode.","signature":"list of portableGraphNode nodes","tags":["thing","field","compute.graph"],"updated":"2026-09-09"},{"name":"outputValues","kind":"field","type":"list of text","description":"Stores output values as list of text.","signature":"list of text outputValues","tags":["thing","field","compute.graph"],"updated":"2026-09-09"},{"name":"eagerParityRequired","kind":"field","type":"bool","description":"Stores eager parity required as bool.","signature":"bool eagerParityRequired","tags":["thing","field","compute.graph"],"updated":"2026-09-09"},{"name":"constructionPolicy","kind":"field","type":"text","description":"Stores construction policy as text.","signature":"text constructionPolicy","tags":["thing","field","compute.graph"],"updated":"2026-09-09"},{"name":"portableComputeGraph","kind":"constructor","parameters":[{"name":"name","type":"text","description":"Name."},{"name":"values","type":"list of portableGraphValue","description":"Values."},{"name":"nodes","type":"list of portableGraphNode","description":"Nodes."},{"name":"outputValues","type":"list of text","description":"Output values."},{"name":"eagerParityRequired","type":"bool","description":"Eager parity required."},{"name":"constructionPolicy","type":"text","description":"Construction policy."}],"returns":"void","signature":"portableComputeGraph(text name, list of portableGraphValue values, list of portableGraphNode nodes, list of text outputValues, bool eagerParityRequired, text constructionPolicy)","description":"Portable compute graph.","tags":["thing","constructor","compute.graph"],"updated":"2026-09-09"},{"name":"CacheKey","kind":"method","parameters":[],"returns":"text","signature":"CacheKey() returns text","description":"Cache key.","tags":["thing","method","compute.graph"],"exampleId":"method-CacheKey-7","updated":"2026-09-09"}],"tags":["compute","compute.graph","cpu","graph","method","source-example","thing","yeho"],"updated":"2026-09-09","source":{"repository":"yeho","path":"packages/compute/graph/portable_contract.yh","line":131,"sha256":"7d368be12911192817194c8170d8f193f9b1b7d33e85834c9f44df101d82cf76"},"status":"source-declared","notes":["Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup."],"examples":[{"id":"usage","title":"Use portableComputeGraph","description":"A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.","code":"using compute.graph\n\n// Describe compute work as an explicit graph with package-owned validation and scheduling metadata.\nportableComputeGraph sample = portableComputeGraph(\"Nova\", [], [], [], true, \"construction Policy\")\nConsole.Log(Text.From(sample.name))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.compute_graph__portablecomputegraph\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n\n[[dependencies]]\npackage = \"compute.buffer\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/buffer\"\n\n[[dependencies]]\npackage = \"compute.device\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/device\"\n\n[[dependencies]]\npackage = \"compute.graph\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/graph\"\n\n[[dependencies]]\npackage = \"compute.kernels\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/kernels\"\n\n[[dependencies]]\npackage = \"compute.tensor\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/tensor\"\n\n[[dependencies]]\npackage = \"console\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/console\"\n\n[[dependencies]]\npackage = \"diagnostics\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/diagnostics\"\n","tags":["cpu","source-example"],"verification":"type checked","run":"cpu-oracle","sha256":"abb56a88a5bb5b67bacfb41649ec90fed4eb949e4eb9969f4df5b0869c760ebd","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null},{"id":"method-CacheKey-7","title":"portableComputeGraph.CacheKey","description":"A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.","code":"using compute.graph\n\n// Cache key.\nportableComputeGraph instance = portableComputeGraph(\"Nova\", [], [], [], true, \"construction Policy\")\ntext result = instance.CacheKey()\nConsole.Log(Text.From(result))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.compute_graph__portablecomputegraph\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n\n[[dependencies]]\npackage = \"compute.buffer\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/buffer\"\n\n[[dependencies]]\npackage = \"compute.device\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/device\"\n\n[[dependencies]]\npackage = \"compute.graph\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/graph\"\n\n[[dependencies]]\npackage = \"compute.kernels\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/kernels\"\n\n[[dependencies]]\npackage = \"compute.tensor\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/tensor\"\n\n[[dependencies]]\npackage = \"console\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/console\"\n\n[[dependencies]]\npackage = \"diagnostics\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/diagnostics\"\n","tags":["cpu","method","source-example"],"run":"cpu-oracle","verification":"type checked","sha256":"59d86a5fd110b65344adee225511b68f0d6345f2ce32a7d62df8484865cbc324","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":["name","values","nodes","outputValues","eagerParityRequired","constructionPolicy","portableComputeGraph","CacheKey"],"url":"https://demonhunterlabs.com/academy/api?item=compute.graph--portableComputeGraph","json":"https://demonhunterlabs.com/reference/items/compute.graph--portableComputeGraph.json","markdown":"https://demonhunterlabs.com/reference/text/compute.graph--portableComputeGraph.md"}
