Skip to content

Conversation

@oraluben
Copy link
Contributor

@oraluben oraluben commented Feb 10, 2026

  In file included from /project/3rdparty/tvm/3rdparty/tvm-ffi/include/tvm/ffi/any.h:27,
                   from /project/3rdparty/tvm/3rdparty/tvm-ffi/include/tvm/ffi/reflection/registry.h:26,
                   from /project/3rdparty/tvm/src/relax/transform/meta_schedule.cc:24:
  In static member function ‘static tvm::ffi::String tvm::ffi::String::Concat(const char*, size_t, const char*, size_t)’,
      inlined from ‘tvm::ffi::String tvm::ffi::operator+(const String&, const char*)’ at /project/3rdparty/tvm/3rdparty/tvm-ffi/include/tvm/ffi/string.h:972:60,
      inlined from ‘tvm::relax::transform::MetaScheduleApplyDatabase(tvm::ffi::Optional<tvm::ffi::String>, bool)::<lambda(tvm::IRModule, tvm::relax::transform::PassContext)>’ at /project/3rdparty/tvm/src/relax/transform/meta_schedule.cc:90:54:
  /project/3rdparty/tvm/3rdparty/tvm-ffi/include/tvm/ffi/string.h:669:16: warning: ‘void* memcpy(void*, const void*, size_t)’ offset [-15, -8] is out of the bounds [0, 16] of object ‘path_workload’ with type ‘tvm::ffi::String’ [-Warray-bounds=]
    669 |     std::memcpy(dest_data + lhs_size, rhs, rhs_size);
        |     ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /project/3rdparty/tvm/src/relax/transform/meta_schedule.cc: In function ‘tvm::relax::transform::MetaScheduleApplyDatabase(tvm::ffi::Optional<tvm::ffi::String>, bool)::<lambda(tvm::IRModule, tvm::relax::transform::PassContext)>’:
  /project/3rdparty/tvm/src/relax/transform/meta_schedule.cc:90:19: note: ‘path_workload’ declared here
     90 |       ffi::String path_workload = work_dir.value() + "/database_workload.json";
        |                   ^~~~~~~~~~~~~

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @oraluben, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a GCC compiler warning by explicitly suppressing the -Warray-bounds diagnostic within the String class. This change aims to clean up compiler output without altering the runtime behavior or logic of the string concatenation operation.

Highlights

  • GCC Warning Suppression: Added a #pragma GCC diagnostic ignored "-Warray-bounds" directive to the String class implementation in include/tvm/ffi/string.h. This suppresses a specific GCC warning related to array bounds, likely to address a false positive or an intentional pattern that GCC flags.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • include/tvm/ffi/string.h
    • Added a GCC diagnostic pragma to ignore the -Warray-bounds warning.
Activity
  • No specific activity has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds a pragma to suppress a -Warray-bounds warning from GCC. This warning is likely a false positive related to the small string optimization logic, where the compiler may not be able to correctly determine buffer bounds through complex template code. The underlying code appears to handle memory correctly, ensuring accesses are within bounds. Suppressing the warning in this targeted manner is an appropriate fix. The change is correct and helps maintain a clean build.

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.

1 participant