Skip to content

Conversation

Copy link

Copilot AI commented Dec 18, 2025

Addresses feedback on PR #183 regarding unnecessary conditional compilation in tests/AMSlib/wf/policy.cpp.

The file unconditionally includes wf/layout_transform.hpp at line 11, making the #if __has_include("wf/layout_transform.hpp") guard around the DummyLayout class methods redundant—compilation would have already failed if the header was unavailable.

Changes:

  • Removed #if __has_include("wf/layout_transform.hpp") / #endif wrapper from DummyLayout::pack() and DummyLayout::unpack() methods
class DummyLayout final : public LayoutTransform
{
public:
  const char* name() const noexcept override { return "DummyLayout"; }

-  // Only needed if you included the real LayoutTransform interface.
-#if __has_include("wf/layout_transform.hpp")
  AMSExpected<IndexMap> pack(const TensorBundle&,
                             const TensorBundle&,
                             at::Tensor&) override
  {
    return IndexMap{};
  }
  AMSStatus unpack(const torch::jit::IValue&,
                   TensorBundle&,
                   TensorBundle&,
                   std::optional<at::Tensor>&) override
  {
    return {};
  }
-#endif
};

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: koparasy <1258022+koparasy@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on 'Add policy concept' PR Remove redundant __has_include check in policy test Dec 18, 2025
Copilot AI requested a review from koparasy December 18, 2025 21:05
@koparasy koparasy marked this pull request as ready for review December 18, 2025 21:06
@koparasy koparasy merged commit 67c2a70 into features/policy Dec 18, 2025
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.

2 participants