ROCR-Runtime icon indicating copy to clipboard operation
ROCR-Runtime copied to clipboard

[Issue]: The lazy_ptr called an undefined function `Init()`

Open zhoumin2 opened this issue 1 year ago • 2 comments

Problem Description

The function Init() called by the one of constructors of lazy_ptr is undefined. That constructor is not used by other code so that the compiler doesn't complain. The related codes are as following from src/core/util/lazy_ptr.h:

/*
 * Wrapper for a std::unique_ptr that initializes its object at first use.
 */
template <typename T> class lazy_ptr {
 public:
  lazy_ptr() {}
 
  explicit lazy_ptr(std::function<T*()> Constructor) { Init(Constructor); }
 
  lazy_ptr(lazy_ptr&& rhs) {
    obj = std::move(rhs.obj);
    func = std::move(rhs.func);
  }
  ...
}

Operating System

Ubuntu

CPU

Intel(R) Xeon(R)

GPU

Other

Other

No response

ROCm Version

ROCm 6.0.0

ROCm Component

ROCR-Runtime

Steps to Reproduce

No response

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

zhoumin2 avatar Mar 12 '24 10:03 zhoumin2

Hi, @shwetagkhatri ,is this a misunderstanding?

zhoumin2 avatar Mar 15 '24 14:03 zhoumin2

@zhoumin2 - No..this seems to be a valid change. Thanks. I have merged this patch into our internal AMD branch.

shwetagkhatri avatar Mar 28 '24 19:03 shwetagkhatri