{
  "id": "tensorflow/opkernel-registration-failed",
  "signature": "tensorflow.python.framework.errors_impl.InternalError: OpKernel registration failed: Could not find 'CustomOp' in the list of registered ops",
  "signature_zh": "tensorflow.python.framework.errors_impl.InternalError：OpKernel 注册失败：在已注册的操作列表中找不到 'CustomOp'",
  "regex": "OpKernel registration failed: Could not find '.*' in the list of registered ops",
  "domain": "tensorflow",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "A custom TensorFlow operation was compiled for a different TF version or ABI, causing registration to fail at runtime.",
  "root_cause_type": "generic",
  "root_cause_zh": "自定义 TensorFlow 操作针对不同的 TF 版本或 ABI 编译，导致运行时注册失败。",
  "versions": [
    {
      "version": "tensorflow 2.15",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "tensorflow 2.16",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "tensorflow 2.17",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Reinstalling TensorFlow via pip does not resolve custom op registration failures because the custom op library must be rebuilt against the exact installed version.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Copying the .so file from another machine often fails due to glibc or CUDA version mismatches.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Rebuild the custom op library using `bazel build //tensorflow/core/user_ops:custom_op.so` with the same TensorFlow source version as the runtime. Then load it via `tf.load_op_library('./custom_op.so')`.",
      "success_rate": 0.88,
      "how": "Rebuild the custom op library using `bazel build //tensorflow/core/user_ops:custom_op.so` with the same TensorFlow source version as the runtime. Then load it via `tf.load_op_library('./custom_op.so')`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use `tf.raw_ops` as a fallback if the custom op is a standard operation with a different name.",
      "success_rate": 0.6,
      "how": "Use `tf.raw_ops` as a fallback if the custom op is a standard operation with a different name.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Rebuild the custom op library using `bazel build //tensorflow/core/user_ops:custom_op.so` with the same TensorFlow source version as the runtime. Then load it via `tf.load_op_library('./custom_op.so')`.",
    "Use `tf.raw_ops` as a fallback if the custom op is a standard operation with a different name."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.tensorflow.org/guide/create_op",
  "official_doc_section": null,
  "error_code": "CUST",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.88,
  "resolvable": "true",
  "first_seen": "2024-02-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}