Skip to content

(feat): Add a straightforward implementation for tile iterator. #50

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

Merged
merged 5 commits into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions tests/cpp/cell/test_device_array.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include "cell/copy/mod.hpp"
#include "common/test_utils.hpp"
#include "types/mod.hpp"

Expand All @@ -7,7 +6,6 @@
namespace tiledcuda {

using namespace cell;
using namespace cute;

namespace testing {

Expand Down
2 changes: 1 addition & 1 deletion tests/cpp/cell/test_g2s_copy.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "cell/copy/mod.hpp"
#include "cell/copy/dyn_copy.hpp"
Copy link
Member

Choose a reason for hiding this comment

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

I wonder why such modifications are necessary in order for it to compile successfully?

Copy link
Member Author

@haruhi55 haruhi55 Jun 23, 2024

Choose a reason for hiding this comment

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

The include order in copy/mod.hpp is as follows:

#include "cell/copy/copy.hpp"
#include "cell/copy/dyn_copy.hpp"
#include "cell/copy/static_copy.hpp"

copy/copy.hpp is before dyn_copy.hpp.

copy.hpp includes <cute/algorithm/copy.hpp>:

#include <cute/algorithm/copy.hpp>

and dyn_copy.hpp include <cute/tensor.hpp>

#include <cute/tensor.hpp>

In a conclusion, <cute/algorithm/copy.hpp> is included before <cute/tensor.hpp>. When I upgrade g++ into 10.5.0., it complains that:

error: namespace "cute::detail" has no member "is_prefetch"

Similar issues can be found in: NVIDIA/cutlass#1508 and NVIDIA/cutlass#1484

I am not sure why the compilation is successful in g++ 9.4.

Copy link
Member

Choose a reason for hiding this comment

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

It seems this might be a bug in CuTe, where they haven't handled the dependencies between header files very well.

Copy link
Member

Choose a reason for hiding this comment

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

The include order in copy/mod.hpp is as follows:

#include "cell/copy/copy.hpp"
#include "cell/copy/dyn_copy.hpp"
#include "cell/copy/static_copy.hpp"

copy/copy.hpp is before dyn_copy.hpp.

copy.hpp includes <cute/algorithm/copy.hpp>:

#include <cute/algorithm/copy.hpp>

and dyn_copy.hpp include <cute/tensor.hpp>

#include <cute/tensor.hpp>

In a conclusion, <cute/algorithm/copy.hpp> is included before <cute/tensor.hpp>. When I upgrade g++ into 10.5.0., it complains that:

error: namespace "cute::detail" has no member "is_prefetch"

Similar issues can be found in: NVIDIA/cutlass#1508 and NVIDIA/cutlass#1484

I am not sure why the compilation is successful in g++ 9.4.

So does that mean when using copy-related functions later, we won't be able to directly include all the copy-related header files, but can only include one specific header file?

Copy link
Member Author

Choose a reason for hiding this comment

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

I suspect things won't be that bad. I suggest leaving this PR to be merged later. I can examine the include order to make it clearer.

#include "cell/sync.hpp"
#include "cell/traits/copy.hpp"
#include "common/test_utils.hpp"
Expand Down
3 changes: 1 addition & 2 deletions tests/cpp/cell/test_s2r_copy.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "cell/copy/mod.hpp"
#include "cell/copy/shared_to_register.hpp"
#include "common/test_utils.hpp"
#include "types/mod.hpp"

Expand All @@ -7,7 +7,6 @@
namespace tiledcuda {

using namespace cell;
using namespace cute;
namespace tl = tile_layout;

namespace {
Expand Down