mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-07-15 03:30:11 +00:00
adressed review comments
This commit is contained in:
@@ -247,7 +247,7 @@ UniqueInputs<SIGNATURE> alloc_inputs(const Args<SIGNATURE>& args)
|
||||
template <auto SIGNATURE>
|
||||
requires ValidConvSignature<SIGNATURE> && ConvDirectionIsForward<SIGNATURE> &&
|
||||
ValidUniqueInputs<SIGNATURE>
|
||||
void init_inputs(const Args<SIGNATURE>& args, UniqueInputs<SIGNATURE>& inputs)
|
||||
void init_inputs(const Args<SIGNATURE>& args, Inputs<SIGNATURE>& inputs)
|
||||
{
|
||||
init_tensor_buffer_uniform_fp(inputs.input_buf, args.make_input_descriptor(), -2.0f, 2.0f);
|
||||
init_tensor_buffer_uniform_fp(inputs.weight_buf, args.make_weight_descriptor(), -2.0f, 2.0f);
|
||||
|
||||
@@ -217,7 +217,7 @@ UniqueInputs<SIGNATURE> alloc_inputs(const Args<SIGNATURE>& args);
|
||||
/// @see tensor_initialization
|
||||
template <auto SIGNATURE>
|
||||
requires ValidUniqueInputs<SIGNATURE>
|
||||
void init_inputs(const Args<SIGNATURE>& args, UniqueInputs<SIGNATURE>& inputs);
|
||||
void init_inputs(const Args<SIGNATURE>& args, Inputs<SIGNATURE>& inputs);
|
||||
|
||||
/// @brief Allocate outputs corresponding to a signature.
|
||||
///
|
||||
|
||||
@@ -91,13 +91,6 @@ void DeviceMem::FillUniformRandFp(float min_value, float max_value)
|
||||
throw std::runtime_error("wrong! not entire DeviceMem will be filled");
|
||||
}
|
||||
|
||||
if(std::nextafter(min_value, max_value) >= max_value)
|
||||
{
|
||||
// nextafter is not defined for non-standard data types, skip test for now
|
||||
// throw std::runtime_error("Error while filling device tensor with random integer data:
|
||||
// insufficient precision in specified range");
|
||||
}
|
||||
|
||||
size_t packed_size = packed_size_v<T>;
|
||||
fill_tensor_uniform_rand_fp_values<<<256, 256>>>(
|
||||
static_cast<T*>(mpDeviceBuf), min_value, max_value, (mMemSize * packed_size) / sizeof(T));
|
||||
@@ -106,10 +99,6 @@ void DeviceMem::FillUniformRandFp(float min_value, float max_value)
|
||||
template <typename T>
|
||||
void DeviceMem::FillNormalRandFp(float sigma, float mean)
|
||||
{
|
||||
if(mMemSize % sizeof(T) != 0)
|
||||
{
|
||||
throw std::runtime_error("wrong! not entire DeviceMem will be filled");
|
||||
}
|
||||
|
||||
fill_tensor_norm_rand_fp_values<<<256, 256>>>(
|
||||
static_cast<T*>(mpDeviceBuf), sigma, mean, mMemSize / sizeof(T));
|
||||
|
||||
Reference in New Issue
Block a user