Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion rocprim/include/rocprim/device/config_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ enum class target_arch : unsigned int
gfx1030 = 1030,
gfx1100 = 1100,
gfx1102 = 1102,
gfx1200 = 1200,
gfx1201 = 1201,
unknown = std::numeric_limits<unsigned int>::max(),
};
#endif // DOXYGEN_SHOULD_SKIP_THIS
Expand Down Expand Up @@ -212,7 +214,9 @@ constexpr target_arch get_target_arch_from_name(const char* const arch_name, con
"gfx942",
"gfx1030",
"gfx1100",
"gfx1102"};
"gfx1102",
"gfx1200",
"gfx1201"};
constexpr target_arch target_architectures[] = {
target_arch::gfx803,
target_arch::gfx900,
Expand All @@ -223,6 +227,8 @@ constexpr target_arch get_target_arch_from_name(const char* const arch_name, con
target_arch::gfx1030,
target_arch::gfx1100,
target_arch::gfx1102,
target_arch::gfx1200,
target_arch::gfx1201,
};
static_assert(sizeof(target_names) / sizeof(target_names[0])
== sizeof(target_architectures) / sizeof(target_architectures[0]),
Expand Down Expand Up @@ -283,6 +289,10 @@ auto dispatch_target_arch(const target_arch target_arch)
return Config::template architecture_config<target_arch::gfx1100>::params;
case target_arch::gfx1102:
return Config::template architecture_config<target_arch::gfx1102>::params;
case target_arch::gfx1200:
return Config::template architecture_config<target_arch::gfx1200>::params;
case target_arch::gfx1201:
return Config::template architecture_config<target_arch::gfx1201>::params;
case target_arch::invalid:
assert(false && "Invalid target architecture selected at runtime.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,142 @@ struct default_adjacent_find_config<
: adjacent_find_config<1024, 4>
{};

// Based on input_type = double
template<class input_type>
struct default_adjacent_find_config<
static_cast<unsigned int>(target_arch::gfx1200),
input_type,
std::enable_if_t<(bool(rocprim::is_floating_point<input_type>::value)
&& (sizeof(input_type) <= 8) && (sizeof(input_type) > 4))>>
: adjacent_find_config<64, 2>
{};

// Based on input_type = float
template<class input_type>
struct default_adjacent_find_config<
static_cast<unsigned int>(target_arch::gfx1200),
input_type,
std::enable_if_t<(bool(rocprim::is_floating_point<input_type>::value)
&& (sizeof(input_type) <= 4) && (sizeof(input_type) > 2))>>
: adjacent_find_config<128, 4>
{};

// Based on input_type = rocprim::half
template<class input_type>
struct default_adjacent_find_config<
static_cast<unsigned int>(target_arch::gfx1200),
input_type,
std::enable_if_t<(bool(rocprim::is_floating_point<input_type>::value)
&& (sizeof(input_type) <= 2))>> : adjacent_find_config<64, 64>
{};

// Based on input_type = int64_t
template<class input_type>
struct default_adjacent_find_config<
static_cast<unsigned int>(target_arch::gfx1200),
input_type,
std::enable_if_t<(!bool(rocprim::is_floating_point<input_type>::value)
&& (sizeof(input_type) <= 8) && (sizeof(input_type) > 4))>>
: adjacent_find_config<64, 4>
{};

// Based on input_type = int
template<class input_type>
struct default_adjacent_find_config<
static_cast<unsigned int>(target_arch::gfx1200),
input_type,
std::enable_if_t<(!bool(rocprim::is_floating_point<input_type>::value)
&& (sizeof(input_type) <= 4) && (sizeof(input_type) > 2))>>
: adjacent_find_config<128, 32>
{};

// Based on input_type = short
template<class input_type>
struct default_adjacent_find_config<
static_cast<unsigned int>(target_arch::gfx1200),
input_type,
std::enable_if_t<(!bool(rocprim::is_floating_point<input_type>::value)
&& (sizeof(input_type) <= 2) && (sizeof(input_type) > 1))>>
: adjacent_find_config<256, 32>
{};

// Based on input_type = int8_t
template<class input_type>
struct default_adjacent_find_config<
static_cast<unsigned int>(target_arch::gfx1200),
input_type,
std::enable_if_t<(!bool(rocprim::is_floating_point<input_type>::value)
&& (sizeof(input_type) <= 1))>> : adjacent_find_config<256, 64>
{};

// Based on input_type = double
template<class input_type>
struct default_adjacent_find_config<
static_cast<unsigned int>(target_arch::gfx1201),
input_type,
std::enable_if_t<(bool(rocprim::is_floating_point<input_type>::value)
&& (sizeof(input_type) <= 8) && (sizeof(input_type) > 4))>>
: adjacent_find_config<64, 2>
{};

// Based on input_type = float
template<class input_type>
struct default_adjacent_find_config<
static_cast<unsigned int>(target_arch::gfx1201),
input_type,
std::enable_if_t<(bool(rocprim::is_floating_point<input_type>::value)
&& (sizeof(input_type) <= 4) && (sizeof(input_type) > 2))>>
: adjacent_find_config<64, 32>
{};

// Based on input_type = rocprim::half
template<class input_type>
struct default_adjacent_find_config<
static_cast<unsigned int>(target_arch::gfx1201),
input_type,
std::enable_if_t<(bool(rocprim::is_floating_point<input_type>::value)
&& (sizeof(input_type) <= 2))>> : adjacent_find_config<256, 16>
{};

// Based on input_type = int64_t
template<class input_type>
struct default_adjacent_find_config<
static_cast<unsigned int>(target_arch::gfx1201),
input_type,
std::enable_if_t<(!bool(rocprim::is_floating_point<input_type>::value)
&& (sizeof(input_type) <= 8) && (sizeof(input_type) > 4))>>
: adjacent_find_config<512, 2>
{};

// Based on input_type = int
template<class input_type>
struct default_adjacent_find_config<
static_cast<unsigned int>(target_arch::gfx1201),
input_type,
std::enable_if_t<(!bool(rocprim::is_floating_point<input_type>::value)
&& (sizeof(input_type) <= 4) && (sizeof(input_type) > 2))>>
: adjacent_find_config<64, 16>
{};

// Based on input_type = short
template<class input_type>
struct default_adjacent_find_config<
static_cast<unsigned int>(target_arch::gfx1201),
input_type,
std::enable_if_t<(!bool(rocprim::is_floating_point<input_type>::value)
&& (sizeof(input_type) <= 2) && (sizeof(input_type) > 1))>>
: adjacent_find_config<256, 2>
{};

// Based on input_type = int8_t
template<class input_type>
struct default_adjacent_find_config<
static_cast<unsigned int>(target_arch::gfx1201),
input_type,
std::enable_if_t<(!bool(rocprim::is_floating_point<input_type>::value)
&& (sizeof(input_type) <= 1))>> : adjacent_find_config<128, 64>
{};

// Based on input_type = double
template<class input_type>
struct default_adjacent_find_config<
Expand Down
Loading