-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CIR][NFC] Match coding style with clang-format CI version
- Loading branch information
Showing
5 changed files
with
23 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,22 @@ | ||
/* A tile with an empty program | ||
Show that declaration of multiple devices of the same kind are actually | ||
different types, allowing 2 devices in the same platform distinguished in a | ||
type-safe way | ||
*/ | ||
|
||
#include "aie++.hpp" | ||
|
||
int main() { | ||
aie::device<aie::npu1> d; | ||
d.tile<2, 3>().program([]{}); | ||
d.tile<2, 3>().program([] {}); | ||
d.run(); | ||
// Check we can get another type for another accelerator of the same kind | ||
aie::device<aie::npu1> other_device_unused; | ||
auto unused_tile = other_device_unused.tile<2, 3>(); | ||
|
||
// Check the type safety | ||
static_assert(!std::is_same_v<decltype(d), decltype(other_device_unused)>); | ||
static_assert( | ||
!std::is_same_v<decltype(d.tile<2, 3>()), decltype(unused_tile)>); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters