{"id":"tag--auto","name":"auto","owner":"yeho","package":"runtime","kind":"runtime","signature":"auto","description":"Leave compute placement compatible with the selected backend. Build the same [auto] source separately for CPU oracle or Metal; the tag alone does not prove which processor ran it.","context":"CPU and GPU data processing with explicit ownership and completion.","parameters":[],"returns":"","members":[],"tags":["auto","compute","cpu","gpu","yeho"],"updated":"2026-09-09","source":{"repository":"yeho","path":"docs/runtime/execution-boundaries.md; docs/runtime/metal-compute-v1.md"},"status":"experimental","notes":[],"examples":[{"id":"auto","title":"Automatic · [auto]","description":"Keep the same portable source for separate CPU and GPU builds. Choose --backend cpu-oracle or --backend metal explicitly; [auto] is not proof of GPU execution.","code":"[auto]\ncompute ApplyDamage(buffer of int health, int damage)\n{\n    int index = compute.index\n    if index >= health.count { return }\n    health[index] = health[index] - damage\n}\n\nbuffer of int health\nhealth.Add(100)\nhealth.Add(80)\nhealth.Add(60)\ncomputeTask job = dispatch ApplyDamage(health, 10)\nwait job\nif job.failed { Console.Error(job.error.message) Process.Exit(1) }\nfor index from 0 < health.count { Console.Log(Text.From(health[index])) }\n","tags":["auto","cpu","gpu","compute"],"run":"metal","expected":"90\n70\n50","verifyRun":true,"manifest":"manifestVersion = \"2\"\npackage = \"api.example.tag__auto\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n","verification":"executed","sha256":"85fc84c62bec2b48a6b8362156e633e4f5440db0ad963e796d3f0a6f504f36bd","checked":"2026-09-09","diagnostic":"","observedOutput":"90\n70\n50","checkedBackend":"metal"}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=tag--auto","json":"https://demonhunterlabs.com/reference/items/tag--auto.json","markdown":"https://demonhunterlabs.com/reference/text/tag--auto.md"}
