Skip to content

Introduce get_target_architecture helper function #2485

Description

@mawad-amd

This issue proposes adding a get_target_architecture function that returns something like "aie2p" or "aie2". Jeff's suggestion which Joe and I recommend is below.

Originally posted by @fifield in #2475 (comment)

I'd propose using the target model which already has this information to support C++ RTTI. Then it's a simple wrapper like getting the number of rows or columns:

    # in iron/device.py
    @property
    def arch(self):
        return get_target_model(self._device).get_target_arch()

I guess it would return a python enum of the C++:

enum class AIEArch : uint32_t {
  AIE1 = 1,
  AIE2 = 2,
  AIE2p = 3,
};

The TODO here is to add get_target_arch() wrapping AIETargetModel::getTargetArch in python/AIEMLIRModule.cpp

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions