はじめに
このブログでは、Tenstorrent の Grendel の情報を10月に2回、アップしました。
今回は、Grendel の AIアクセラレータが Quasar であることが分かるコードがアップされたので、記録に残します。
Grendel の AI アクセラレータは、Quasar
ここです。
std::unique_ptr<architecture_implementation> architecture_implementation::create(tt::ARCH architecture) {
switch (architecture) {
case tt::ARCH::QUASAR:
return std::make_unique<grendel_implementation>();
case tt::ARCH::BLACKHOLE:
return std::make_unique<blackhole_implementation>();
case tt::ARCH::WORMHOLE_B0:
return std::make_unique<wormhole_implementation>();
default:
return nullptr;
}
}
QUASAR のところで、grendel_implementation を呼んでいます。
grendel_implementation は、ここで定義されています。
コードの中に、NEO があるので、Quasar 確実です。
// Fill up Tensix related bits based on architecture agnostic bits.
if ((risc_type & RiscType::ALL) != RiscType::NONE) {
risc_type |= RiscType::ALL_NEO;
}
if ((risc_type & RiscType::ALL_TRISCS) != RiscType::NONE) {
risc_type |= RiscType::ALL_NEO_TRISCS;
}
if ((risc_type & RiscType::ALL_DATA_MOVEMENT) != RiscType::NONE) {
risc_type |= RiscType::ALL_NEO_DMS;
}
ここには、QSRの PCI DeviceID が載っています。0xFEED なので、本物のPCI DeviceIDじゃないですね。Grendelだと、chiplet 接続になるので、PCI Device ID なさそうなので。
} else if (libttsim_pci_device_id == 0xFEED) { // QSR
uint32_t soft_reset_addr = architecture_impl_->get_tensix_soft_reset_addr();
uint64_t reset_value = uint64_t(soft_resets);
if (soft_resets == TENSIX_ASSERT_SOFT_RESET) {
reset_value = 0xF0000; // This is using old API, translate to QSR values
} else if (soft_resets == TENSIX_DEASSERT_SOFT_RESET) {
reset_value = 0xFFF00; // This is using old API, translate to QSR values
}
pfn_libttsim_tile_wr_bytes(
translated_core.x, translated_core.y, soft_reset_addr, &reset_value, sizeof(reset_value));
} else {
おわりに
GrendelのAIアクセラレータがQuasarということが分かりました。
これから、内部構成が分かるようなコードもアップされるでしょうね。