Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zhoumin2 opened this issue Mar 12, 2024 · 2 comments
Open

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

zhoumin2 opened this issue Mar 12, 2024 · 2 comments
Assignees

Comments

@zhoumin2
Copy link

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
Copy link
Author

Hi, @shwetagkhatri ,is this a misunderstanding?

@shwetagkhatri
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants