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

Working with the Reorder #1980

Open
CodeCrafter18 opened this issue Jun 27, 2024 · 0 comments
Open

Working with the Reorder #1980

CodeCrafter18 opened this issue Jun 27, 2024 · 0 comments
Labels

Comments

@CodeCrafter18
Copy link

Hello!
I have a question regarding the usage of reorders.
For example, let's consider ref_sum.hpp.

if (need_output_reorder()) {
    CHECK(reorder_primitive_desc_create(
		reorder_pds_[n_], engine, dst_acc_md(), dst_md()));
}

In this case, the following function will be called:

status_t reorder_primitive_desc_create(std::shared_ptr<primitive_desc_t> &pd,
        engine_t *engine, const memory_desc_t *src_md,
        const memory_desc_t *dst_md, const primitive_attr_t *attr) {
    return reorder_primitive_desc_create(
            pd, engine, src_md, engine, dst_md, engine, attr);
}

However, in this scenario, create_resource(...) is never called.
If I want to write my own Reorder that overrides the create_resource(...) function,
as it's done in ACL, then I'll get a runtime error when I call ctx.get_resource_mapper()...

How can I work around this problem if my implementation uses resource_mapper?

Also, I have a question about why the Sum, Reorder, and Concat operations have separate logic, for example, for obtaining the list of implementations?​​​​​​​​​​​​​​​​

Thanks.

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

No branches or pull requests

1 participant