adressed review comments

This commit is contained in:
Kevin Abraham
2025-12-15 12:51:15 +00:00
parent ee6b3f34b5
commit e20e646f8c
3 changed files with 2 additions and 13 deletions

View File

@@ -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);

View File

@@ -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.
///

View File

@@ -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));