{
  "schemaVersion": 1,
  "slug": "openvino-first-run",
  "tool": {
    "name": "OpenVINO",
    "repo": "openvinotoolkit/openvino",
    "version": "2026.4.1"
  },
  "environment": {
    "arch": "aarch64",
    "cpu": "Neoverse-N1 x2, CPUQuota 150%",
    "memMB": 2048,
    "os": "Ubuntu 24.04.5 LTS",
    "runtime": "Python 3.12.3",
    "installSeconds": 8.4,
    "installBytes": 174885782
  },
  "method": {
    "hypothesis": "README 사용법: 파이토치나 텐서플로 모델을 내려받아 OpenVINO 모델로 변환한 뒤 CPU 장치용으로 컴파일해 추론을 실행하는 흐름을 안내한다. 이 환경에서 확인: 네트워크와 대형 프레임워크가 없는 오프라인 CPU 샌드박스에서 openvino를 불러와 인메모리 연산 그래프를 직접 구성하고 CPU 컴파일·추론 정확도와 GPU 컴파일 시도 시 예외 종류를 확인한다.",
    "conditions": [
      "네트워크와 GPU가 없고 외부 모델 내려받기를 쓰지 않는 CPU 전용 오프라인 격리 환경이며 파이토치 대신 OpenVINO 내장 연산으로 모델을 만든다.",
      "고정 시드로 생성한 단정밀도 입력 602112바이트와 텐서 1개로 인메모리 모델을 구성해 CPU 컴파일과 추론을 한 차례씩 측정한다.",
      "GPU 장치가 없는 상태에서 GPU 장치 컴파일을 한 번 호출해 오류 발생 여부와 예외 클래스 이름을 기록한다.",
      "판정 기준: 모델 생성·CPU 컴파일·CPU 추론 성공 지표가 모두 1이고 추론 결과가 기대값과 일치하며 GPU 호출 예외 종류가 문자열로 기록되면 정상 동작으로 본다."
    ],
    "repeats": 5
  },
  "script": "import json\nimport time\n\nnp = None\ntry:\n    import numpy as np\nexcept Exception:\n    pass\n\nt0 = time.perf_counter()\nimport_ok = 0\nov = None\nops = None\ntry:\n    import openvino as ov\n    import openvino.opset10 as ops\n    import_ok = 1\nexcept Exception:\n    pass\nimport_ms = (time.perf_counter() - t0) * 1000.0\n\nt0 = time.perf_counter()\nversion_ok = 0\nversion_bytes = 0\ndevice_count = 0\ncore = None\ntry:\n    ver = str(getattr(ov, \"__version__\", \"\"))\n    core = ov.Core()\n    devs = list(core.available_devices)\n    device_count = len(devs)\n    info = f\"{ver}:{','.join(devs)}\"\n    version_bytes = len(info.encode(\"utf-8\"))\n    if ver and device_count >= 1:\n        version_ok = 1\nexcept Exception:\n    pass\nversion_ms = (time.perf_counter() - t0) * 1000.0\n\nt0 = time.perf_counter()\nmodel_build_ok = 0\nov_model = None\nx = None\ntry:\n    np.random.seed(42)\n    x = np.random.randn(1, 3, 224, 224).astype(np.float32)\n    param = ops.parameter([1, 3, 224, 224], ov.Type.f32)\n    mul_node = ops.multiply(param, ops.constant(0.5, ov.Type.f32))\n    add_node = ops.add(mul_node, ops.constant(0.1, ov.Type.f32))\n    relu_node = ops.relu(add_node)\n    ov_model = ov.Model([relu_node], [param], \"offline_demo\")\n    model_build_ok = 1\nexcept Exception:\n    pass\nmodel_build_ms = (time.perf_counter() - t0) * 1000.0\n\nt0 = time.perf_counter()\ncpu_compile_ok = 0\ncompiled_model = None\ntry:\n    compiled_model = core.compile_model(ov_model, \"CPU\")\n    cpu_compile_ok = 1\nexcept Exception:\n    pass\ncpu_compile_ms = (time.perf_counter() - t0) * 1000.0\n\nt0 = time.perf_counter()\ncpu_infer_ok = 0\ncpu_infer_bytes = 0\ntry:\n    out = compiled_model({0: x})\n    res = out[0]\n    cpu_infer_bytes = int(res.nbytes)\n    expected = np.maximum(x * np.float32(0.5) + np.float32(0.1), np.float32(0.0))\n    if res.shape == x.shape and bool(np.allclose(res, expected, atol=1e-5)):\n        cpu_infer_ok = 1\nexcept Exception:\n    pass\ncpu_infer_ms = (time.perf_counter() - t0) * 1000.0\n\nt0 = time.perf_counter()\ngpu_compile_ok = 0\ngpu_compile_err = \"none\"\ntry:\n    _ = core.compile_model(ov_model, \"GPU\")\n    gpu_compile_ok = 1\nexcept Exception as e:\n    mod = type(e).__module__\n    gpu_compile_err = type(e).__name__ if mod == \"builtins\" else f\"{mod}.{type(e).__name__}\"\ngpu_compile_ms = (time.perf_counter() - t0) * 1000.0\n\nprint(json.dumps({\n    \"importMs\": round(import_ms, 3),\n    \"importOk\": import_ok,\n    \"versionMs\": round(version_ms, 3),\n    \"versionBytes\": version_bytes,\n    \"deviceCount\": device_count,\n    \"versionOk\": version_ok,\n    \"modelBuildMs\": round(model_build_ms, 3),\n    \"modelBuildOk\": model_build_ok,\n    \"cpuCompileMs\": round(cpu_compile_ms, 3),\n    \"cpuCompileOk\": cpu_compile_ok,\n    \"cpuInferMs\": round(cpu_infer_ms, 3),\n    \"cpuInferBytes\": cpu_infer_bytes,\n    \"cpuInferOk\": cpu_infer_ok,\n    \"gpuCompileMs\": round(gpu_compile_ms, 3),\n    \"gpuCompileOk\": gpu_compile_ok,\n    \"gpuCompileErr\": gpu_compile_err,\n}))",
  "scriptSha256": "ae2b1accffcf37dafb0d8dc2bb5f2957a2aeee24f433634848df4c3fa7cd0619",
  "runs": [
    {
      "run": 1,
      "importMs": 152.255,
      "importOk": 1,
      "versionMs": 37.935,
      "versionBytes": 46,
      "deviceCount": 1,
      "versionOk": 1,
      "modelBuildMs": 21.061,
      "modelBuildOk": 1,
      "cpuCompileMs": 48.339,
      "cpuCompileOk": 1,
      "cpuInferMs": 4.975,
      "cpuInferBytes": 602112,
      "cpuInferOk": 0,
      "gpuCompileMs": 0.594,
      "gpuCompileOk": 0,
      "gpuCompileErr": "RuntimeError",
      "wallMs": 515.911
    },
    {
      "run": 2,
      "importMs": 106.586,
      "importOk": 1,
      "versionMs": 10.403,
      "versionBytes": 46,
      "deviceCount": 1,
      "versionOk": 1,
      "modelBuildMs": 13.692,
      "modelBuildOk": 1,
      "cpuCompileMs": 24.108,
      "cpuCompileOk": 1,
      "cpuInferMs": 3.522,
      "cpuInferBytes": 602112,
      "cpuInferOk": 0,
      "gpuCompileMs": 0.134,
      "gpuCompileOk": 0,
      "gpuCompileErr": "RuntimeError",
      "wallMs": 366.691
    },
    {
      "run": 3,
      "importMs": 118.21,
      "importOk": 1,
      "versionMs": 10.432,
      "versionBytes": 46,
      "deviceCount": 1,
      "versionOk": 1,
      "modelBuildMs": 13.717,
      "modelBuildOk": 1,
      "cpuCompileMs": 23.604,
      "cpuCompileOk": 1,
      "cpuInferMs": 3.403,
      "cpuInferBytes": 602112,
      "cpuInferOk": 0,
      "gpuCompileMs": 0.143,
      "gpuCompileOk": 0,
      "gpuCompileErr": "RuntimeError",
      "wallMs": 415.813
    },
    {
      "run": 4,
      "importMs": 112.529,
      "importOk": 1,
      "versionMs": 11.338,
      "versionBytes": 46,
      "deviceCount": 1,
      "versionOk": 1,
      "modelBuildMs": 14.17,
      "modelBuildOk": 1,
      "cpuCompileMs": 23.737,
      "cpuCompileOk": 1,
      "cpuInferMs": 3.419,
      "cpuInferBytes": 602112,
      "cpuInferOk": 0,
      "gpuCompileMs": 0.137,
      "gpuCompileOk": 0,
      "gpuCompileErr": "RuntimeError",
      "wallMs": 418.353
    },
    {
      "run": 5,
      "importMs": 109.137,
      "importOk": 1,
      "versionMs": 10.058,
      "versionBytes": 46,
      "deviceCount": 1,
      "versionOk": 1,
      "modelBuildMs": 14.125,
      "modelBuildOk": 1,
      "cpuCompileMs": 23.056,
      "cpuCompileOk": 1,
      "cpuInferMs": 3.518,
      "cpuInferBytes": 602112,
      "cpuInferOk": 0,
      "gpuCompileMs": 0.135,
      "gpuCompileOk": 0,
      "gpuCompileErr": "RuntimeError",
      "wallMs": 366.929
    }
  ],
  "summary": {
    "importMs": {
      "median": 112.529,
      "min": 106.586,
      "max": 152.255,
      "unit": "ms"
    },
    "importOk": {
      "median": 1,
      "min": 1,
      "max": 1,
      "unit": "flag"
    },
    "versionMs": {
      "median": 10.432,
      "min": 10.058,
      "max": 37.935,
      "unit": "ms"
    },
    "versionBytes": {
      "median": 46,
      "min": 46,
      "max": 46,
      "unit": "bytes"
    },
    "deviceCount": {
      "median": 1,
      "min": 1,
      "max": 1,
      "unit": "items"
    },
    "versionOk": {
      "median": 1,
      "min": 1,
      "max": 1,
      "unit": "flag"
    },
    "modelBuildMs": {
      "median": 14.125,
      "min": 13.692,
      "max": 21.061,
      "unit": "ms"
    },
    "modelBuildOk": {
      "median": 1,
      "min": 1,
      "max": 1,
      "unit": "flag"
    },
    "cpuCompileMs": {
      "median": 23.737,
      "min": 23.056,
      "max": 48.339,
      "unit": "ms"
    },
    "cpuCompileOk": {
      "median": 1,
      "min": 1,
      "max": 1,
      "unit": "flag"
    },
    "cpuInferMs": {
      "median": 3.518,
      "min": 3.403,
      "max": 4.975,
      "unit": "ms"
    },
    "cpuInferBytes": {
      "median": 602112,
      "min": 602112,
      "max": 602112,
      "unit": "bytes"
    },
    "cpuInferOk": {
      "median": 0,
      "min": 0,
      "max": 0,
      "unit": "flag"
    },
    "gpuCompileMs": {
      "median": 0.137,
      "min": 0.134,
      "max": 0.594,
      "unit": "ms"
    },
    "gpuCompileOk": {
      "median": 0,
      "min": 0,
      "max": 0,
      "unit": "flag"
    }
  },
  "createdAt": "2026-11-24T06:02:05Z"
}
