Skip to content

Commit

Permalink
Add Arch (#95)
Browse files Browse the repository at this point in the history
* simplify dockerfile recipe to use miopen ci baseimage

* new image

* add arch

* prefix path

* tidy

* tidy suppress

* clang format
  • Loading branch information
cderb authored Jan 3, 2024
1 parent a728115 commit 66bd0d4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/fin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,13 @@ void BaseFin::InitNoGpuHandle(miopen::Handle& handle,

void BaseFin::VerifyDevProps(const std::string& in_arch, const unsigned long in_num_cu)
{
std::cerr << "Verifying device properties" << std::endl;
std::string arch = in_arch;
arch = arch.substr(0, arch.find(':'));
const size_t num_cu = in_num_cu;
std::ignore = num_cu;
std::cerr << "Verifying device properties, arch: " << arch << ", num_cu: " << num_cu
<< std::endl;

if(arch == "gfx900")
{
assert(num_cu == 56 || num_cu == 64);
Expand All @@ -133,6 +135,10 @@ void BaseFin::VerifyDevProps(const std::string& in_arch, const unsigned long in_
{
assert(num_cu == 228);
}
else if(arch == "gfx942")
{
assert(num_cu == 304);
}
else
throw std::runtime_error("Invalid Arch Name");
}
Expand Down

0 comments on commit 66bd0d4

Please sign in to comment.