diff --git a/tf_adapter/kernels/npu_cpu_ops.cc b/tf_adapter/kernels/npu_cpu_ops.cc index aec450540e914d91f2e1687dee1a6ae6854ca651..51a21e9dd6938474715d9a5e352ff2c66de1b39c 100644 --- a/tf_adapter/kernels/npu_cpu_ops.cc +++ b/tf_adapter/kernels/npu_cpu_ops.cc @@ -45,7 +45,7 @@ class LruCacheOp : public ResourceOpKernel { explicit LruCacheOp(OpKernelConstruction* context) : ResourceOpKernel(context) {} void Compute(OpKernelContext* context) override { LOG(INFO) << "LruCacheOp Compute"; } private: - Status CreateResource(CacheInterface** context) override + Status CreateResource(CacheInterface** resource) override EXCLUSIVE_LOCKS_REQUIRED(mu_) { return Status::OK(); } diff --git a/tf_adapter/ops/npu_cpu_ops.cc b/tf_adapter/ops/npu_cpu_ops.cc index 8be545782a4bd6c97e7be58caff3b934f29c2993..6e4a59ca08771857779211bb41fa7c3449a505a0 100644 --- a/tf_adapter/ops/npu_cpu_ops.cc +++ b/tf_adapter/ops/npu_cpu_ops.cc @@ -61,6 +61,7 @@ REGISTER_OP("LruCache") .Attr("cache_size: int") .Attr("container: string = ''") .Attr("shared_name: string = 'LruCache'") + .Attr("load_factor: float = 1.0") .SetIsStateful() .SetShapeFn(shape_inference::ScalarShape); //regist cache add op