Fix bug that can cause different random input data to be generated for CPU and CPU buffers
@@ -494,6 +494,9 @@ namespace Tensile
if(inputs.gpu)
throw std::runtime_error("Initializing GPU inputs as CPU.");
+ if(m_problem.a() != problem.a() || m_problem.b() != problem.b()
+ || m_problem.c() != problem.c() || (!m_cEqualsD && m_problem.d() != problem.d()))
+ {
if(m_problemDependentData)
{
initArray(m_aInit, inputs.managedA.get(), problem.a());
@@ -513,6 +516,9 @@ namespace Tensile
inputs.alpha = getValue<AlphaType>(m_alphaInit);
inputs.beta = getValue<BetaType>(m_betaInit);
+
+ m_problem = problem;
+ }
}
void initializeCPUBadInputs(ManagedInputs& inputs)
@@ -727,6 +733,8 @@ namespace Tensile
std::shared_ptr<ManagedInputs> m_gpuInputsPristine; //< Untouched copies of the inputs
std::shared_ptr<ManagedInputs> m_gpuInputs; //< Inputs to be sent in to GPU kernels
std::shared_ptr<ManagedInputs> m_gpuBadInputs; //< GPU copies of 'bad' values
+ ContractionProblem
+ m_problem; //< Contraction problem for which current inputs are initialized
};
// Commonly used managed contraction input type groupings
