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
This issue proposes adding a
get_target_architecturefunction 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:
I guess it would return a python enum of the C++:
The TODO here is to add
get_target_arch()wrappingAIETargetModel::getTargetArchinpython/AIEMLIRModule.cpp