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

[aot] Add a generic set of AOT structs #3973

Merged
merged 4 commits into from
Jan 8, 2022
Merged

Conversation

k-ye
Copy link
Member

@k-ye k-ye commented Jan 8, 2022

Related issue = #3334

I haven't really switched OpenGL or Vulkan to use these new AOT structs yet, but the migration should be very simple, e.g.,

auto ad = AotDataConverter::convert(aot_data_);
TextSerializer ts;
t2.serialize_to_json("aot_data", ad);
t2.print();

I've also added/removed/changed a few field names:

  • ScalarArg
    • offset_in_bytes_in_args_buf --> offset_in_args_buf
  • ogl::CompiledArrayArg --> aot::ArrayArg
    • shape_offset_in_bytes_in_args_buf --> shape_offset_in_args_buf
    • Added bind_index
  • CompiledTaichiKernel
    • arg_count --> args_count
    • ret_count --> rets_count
    • args_buf_size --> args_buffer_size
    • ret_buf_size --> rets_buffer_size
    • Removed used.arr_arg_to_bind_idx

@netlify
Copy link

netlify bot commented Jan 8, 2022

✔️ Deploy Preview for jovial-fermat-aa59dc canceled.

🔨 Explore the source changes: 0943d6f

🔍 Inspect the deploy log: https://app.netlify.com/sites/jovial-fermat-aa59dc/deploys/61d90165b78eca0007771839

@k-ye
Copy link
Member Author

k-ye commented Jan 8, 2022

/format

Copy link
Contributor

@ailzhang ailzhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice thanks!!
for the bind_idx, I agree it makes more sense to move from CompiledTaichiKernel to ArrayArg for opengl backend as well :D

struct CompiledOffloadedTask {
std::string type;
std::string name;
// Do we need to inline the source code?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO it's fine to keep them as separate files?

@ailzhang ailzhang merged commit d5f4951 into taichi-dev:master Jan 8, 2022
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

Successfully merging this pull request may close these issues.

3 participants