mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-21 21:39:15 +00:00
Reduction external API and client examples (#493)
* Change to the DeviceReduce base class template to include all problem description information
* Add external api for reduction
* Add client example to test the reduction external api
* Spelling correction
* Re-implement the host_reduction to follow the DeviceReduce base API format
* Change the reduce profiler to call the external API for collecting device instances
* Rename reduce client example directory from 08_reduce to 12_reduce
* Remove (void) before the functional call
* Tiny update in reduce client example
* Tiny update in profile_reduce_impl.hpp
* Rename the reduce client example directory
Co-authored-by: Po Yen Chen <PoYen.Chen@amd.com>
[ROCm/composable_kernel commit: 80e0526741]
This commit is contained in:
@@ -251,27 +251,27 @@ constexpr T GetIdentityValueForInMemoryDataOperation(InMemoryDataOperationEnum o
|
||||
};
|
||||
|
||||
template <InMemoryDataOperationEnum Operation, typename DataType>
|
||||
struct InMemoryDataOperatonSupportedOnDataType
|
||||
struct InMemoryDataOperationSupportedOnDataType
|
||||
{
|
||||
static constexpr bool value = false;
|
||||
};
|
||||
|
||||
template <typename DataType>
|
||||
struct InMemoryDataOperatonSupportedOnDataType<InMemoryDataOperationEnum::AtomicAdd, DataType>
|
||||
struct InMemoryDataOperationSupportedOnDataType<InMemoryDataOperationEnum::AtomicAdd, DataType>
|
||||
{
|
||||
static constexpr bool value =
|
||||
is_same<DataType, float>::value || is_same<DataType, double>::value;
|
||||
};
|
||||
|
||||
template <typename DataType>
|
||||
struct InMemoryDataOperatonSupportedOnDataType<InMemoryDataOperationEnum::AtomicMax, DataType>
|
||||
struct InMemoryDataOperationSupportedOnDataType<InMemoryDataOperationEnum::AtomicMax, DataType>
|
||||
{
|
||||
static constexpr bool value =
|
||||
is_same<DataType, float>::value || is_same<DataType, double>::value;
|
||||
};
|
||||
|
||||
template <typename DataType>
|
||||
struct InMemoryDataOperatonSupportedOnDataType<InMemoryDataOperationEnum::Set, DataType>
|
||||
struct InMemoryDataOperationSupportedOnDataType<InMemoryDataOperationEnum::Set, DataType>
|
||||
{
|
||||
static constexpr bool value =
|
||||
is_same<DataType, float>::value || is_same<DataType, double>::value ||
|
||||
@@ -280,7 +280,7 @@ struct InMemoryDataOperatonSupportedOnDataType<InMemoryDataOperationEnum::Set, D
|
||||
};
|
||||
|
||||
template <typename DataType>
|
||||
struct InMemoryDataOperatonSupportedOnDataType<InMemoryDataOperationEnum::Add, DataType>
|
||||
struct InMemoryDataOperationSupportedOnDataType<InMemoryDataOperationEnum::Add, DataType>
|
||||
{
|
||||
static constexpr bool value =
|
||||
is_same<DataType, float>::value || is_same<DataType, double>::value ||
|
||||
|
||||
Reference in New Issue
Block a user