Skip to content

aie4 changes#86

Merged
chvamshi-xilinx merged 2 commits into
Xilinx:main-gefrom
HimanshuChoudhary-Xilinx:aie4_changes_1
May 9, 2025
Merged

aie4 changes#86
chvamshi-xilinx merged 2 commits into
Xilinx:main-gefrom
HimanshuChoudhary-Xilinx:aie4_changes_1

Conversation

@HimanshuChoudhary-Xilinx
Copy link
Copy Markdown
Collaborator

@HimanshuChoudhary-Xilinx HimanshuChoudhary-Xilinx commented May 2, 2025

Problem solved by the commit

Aiebu change to support aie4 target

  1. added new target asm_aie4
  2. aie2ps and aie4 have 2 things different
    a. patch57 schema and control packet schema
    b. actor_id's for tiles/mm2s/s2mm
  3. created assembler_state base class and aie2ps and aie4 derived class. We have create_assembler_state virtual function which will return aie4 or aie2ps assembler_state shared ptr.
  4. created aie4 encoder class from aie2ps encoder as only patch57 and assember_state is different.

Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered

NA

How problem was solved, alternative solutions (if any) and why they were rejected

NA

Risks (if any) associated the changes in the commit

What has been tested and how, request additional testing if necessary

Documentation impact (if any)

USAGE

> aiebu-asm -t aie2ps -c ..\test\cpp_test\aie2ps\eff_net_coal\ml_asm\merged_control.asm -L ..\test\cpp_test\aie2ps\eff_net_coal\ml_asm -L ..\test\cpp_test\aie2ps\eff_net_coal\asm\ -o controlcode.elf

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

};

class assembler_state
class assembler_state : public std::enable_shared_from_this<assembler_state>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: class 'assembler_state' defines a default destructor, a copy constructor, a copy assignment operator and a move constructor but does not define a move assignment operator [cppcoreguidelines-special-member-functions]

class assembler_state : public std::enable_shared_from_this<assembler_state>
      ^

std::map<std::string, std::shared_ptr<scratchpad_info>>& scratchpad,
std::map<std::string, uint32_t>& labelpageindex, uint32_t control_packet_index, bool makeunique);
assembler_state(const assembler_state& rhs) = default;
assembler_state& operator=(const assembler_state& rhs) = default;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: deleted member function should be public [hicpp-use-equals-delete]

  assembler_state& operator=(const assembler_state& rhs) = default;
                   ^

std::map<std::string, std::shared_ptr<scratchpad_info>>& scratchpad,
std::map<std::string, uint32_t>& labelpageindex, uint32_t control_packet_index, bool makeunique);
assembler_state(const assembler_state& rhs) = default;
assembler_state& operator=(const assembler_state& rhs) = default;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: explicitly defaulted copy assignment operator is implicitly deleted [clang-diagnostic-defaulted-function-deleted]

  assembler_state& operator=(const assembler_state& rhs) = default;
                   ^
Additional context

src/cpp/common/assembler_state.h:149: copy assignment operator of 'assembler_state' is implicitly deleted because field 'm_data' is of reference type 'std::vector<std::shared_ptr<asm_data>> &'

  std::vector<std::shared_ptr<asm_data>>& m_data;
                                          ^

src/cpp/common/assembler_state.h:145: replace 'default' with 'delete'

  assembler_state& operator=(const assembler_state& rhs) = default;
                                                           ^

COALESED_BUFFER
};

symbol::patch_schema control_packet_patching = symbol::patch_schema::control_packet_57;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: member variable 'control_packet_patching' has protected visibility [cppcoreguidelines-non-private-member-variables-in-classes]

  symbol::patch_schema control_packet_patching = symbol::patch_schema::control_packet_57;
                       ^

Copy link
Copy Markdown
Collaborator

@stsoe stsoe left a comment

Choose a reason for hiding this comment

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

There are other fundamental changes, such as pointer semantics. Please describe the changes in the PR summary, rather than just a one liner.

Comment thread src/cpp/common/assembler_state.h Outdated
get_actor_id_map() const override
{
static std::unordered_map<std::string, ActionId> actor_id = {
{"mm2s", {5, 6}}, //NOLINT
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

aie4, if tile type is not specified, it is an error.
so line 246-247 should be removed

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

done

Comment thread src/cpp/common/assembler_state.h Outdated
{"s2mm", {5, 0}}, //NOLINT
{"tile_mm2s", {10, 6}}, //NOLINT
{"tile_s2mm", {10, 0}}, //NOLINT
{"shim_mm2s", {10, 6}}, //NOLINT
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

please see table 3-23 in latest spec
this part now is very ugly ...
memtile, the mm2s actor id has a hole
shimtile, actor id of s2mm 0 & 1 are not contiguous
there is also a trace_s2mm channel

check to see whether the data structure define can handle all these case.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

checked and fixed

Copy link
Copy Markdown
Collaborator

@stsoe stsoe left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: HimanshuChoudhary-Xilinx <Himanshu.Choudhary@amd.com>
Signed-off-by: HimanshuChoudhary-Xilinx <Himanshu.Choudhary@amd.com>
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

std::map<std::string, std::shared_ptr<scratchpad_info>>& scratchpad,
std::map<std::string, uint32_t>& labelpageindex, uint32_t control_packet_index, bool makeunique);
assembler_state(const assembler_state& rhs) = default;
assembler_state& operator=(const assembler_state& rhs) = default;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: explicitly defaulted copy assignment operator is implicitly deleted [clang-diagnostic-defaulted-function-deleted]

  assembler_state& operator=(const assembler_state& rhs) = default;
                   ^
Additional context

src/cpp/common/assembler_state.h:148: copy assignment operator of 'assembler_state' is implicitly deleted because field 'm_data' is of reference type 'std::vector<std::shared_ptr<asm_data>> &'

  std::vector<std::shared_ptr<asm_data>>& m_data;
                                          ^

src/cpp/common/assembler_state.h:144: replace 'default' with 'delete'

  assembler_state& operator=(const assembler_state& rhs) = default;
                                                           ^

@chvamshi-xilinx chvamshi-xilinx merged commit ad258eb into Xilinx:main-ge May 9, 2025
4 checks passed
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.

4 participants