From 773683b462b41aa96c8c00049bcf0896efed3b55 Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Wed, 22 Jan 2025 17:39:15 -0800 Subject: [PATCH] Use MT_PROFILE_FUNCTION() for function level profile Summary: The custom event names are outdated and inconsistent; using the function name in the profiler is more consistent and will always be up-to-date. Reviewed By: EscapeZero Differential Revision: D68530787 --- .../model_parameters_sequence_error_function.cpp | 3 +-- .../character_sequence_solver/multipose_solver.cpp | 2 +- .../multipose_solver_function.cpp | 2 +- momentum/character_sequence_solver/sequence_solver.cpp | 4 ++-- .../state_sequence_error_function.cpp | 6 +++--- momentum/character_solver/aim_error_function.cpp | 4 ++-- momentum/character_solver/collision_error_function.cpp | 2 +- .../collision_error_function_stateless.cpp | 2 +- .../character_solver/constraint_error_function-inl.h | 6 +++--- .../character_solver/fixed_axis_error_function.cpp | 6 +++--- momentum/character_solver/limit_error_function.cpp | 8 ++++---- .../model_parameters_error_function.cpp | 2 +- momentum/character_solver/normal_error_function.cpp | 2 +- .../character_solver/orientation_error_function.cpp | 2 +- momentum/character_solver/plane_error_function.cpp | 2 +- .../character_solver/pose_prior_error_function.cpp | 4 ++-- momentum/character_solver/position_error_function.cpp | 2 +- .../character_solver/simd_normal_error_function.cpp | 4 ++-- .../character_solver/simd_plane_error_function.cpp | 4 ++-- .../character_solver/simd_position_error_function.cpp | 3 ++- momentum/character_solver/skeleton_solver_function.cpp | 10 +++++----- momentum/character_solver/state_error_function.cpp | 6 +++--- momentum/character_solver/vertex_error_function.cpp | 2 +- momentum/solver/gauss_newton_solver.cpp | 2 +- momentum/solver/gradient_descent_solver.cpp | 2 +- momentum/solver/subset_gauss_newton_solver.cpp | 2 +- 26 files changed, 47 insertions(+), 47 deletions(-) diff --git a/momentum/character_sequence_solver/model_parameters_sequence_error_function.cpp b/momentum/character_sequence_solver/model_parameters_sequence_error_function.cpp index 1d6586de..4aef06f1 100644 --- a/momentum/character_sequence_solver/model_parameters_sequence_error_function.cpp +++ b/momentum/character_sequence_solver/model_parameters_sequence_error_function.cpp @@ -102,13 +102,12 @@ double ModelParametersSequenceErrorFunctionT::getJacobian( Eigen::Ref> jacobian, Eigen::Ref> residual, int& usedRows) const { + MT_PROFILE_FUNCTION(); MT_CHECK( jacobian.cols() == gsl::narrow_cast( numFrames() * this->parameterTransform_.numAllModelParameters())); - MT_PROFILE_EVENT("MotionError: getJacobian"); - usedRows = 0; const auto np = gsl::narrow_cast(this->parameterTransform_.numAllModelParameters()); diff --git a/momentum/character_sequence_solver/multipose_solver.cpp b/momentum/character_sequence_solver/multipose_solver.cpp index 4cf1f289..ad617a57 100644 --- a/momentum/character_sequence_solver/multipose_solver.cpp +++ b/momentum/character_sequence_solver/multipose_solver.cpp @@ -46,7 +46,7 @@ void MultiposeSolverT::initializeSolver() {} template void MultiposeSolverT::doIteration() { - MT_PROFILE_EVENT("MultiposeIteration"); + MT_PROFILE_FUNCTION(); MultiposeSolverFunctionT* fn = dynamic_cast*>(this->solverFunction_); diff --git a/momentum/character_sequence_solver/multipose_solver_function.cpp b/momentum/character_sequence_solver/multipose_solver_function.cpp index 45847057..33ac5161 100644 --- a/momentum/character_sequence_solver/multipose_solver_function.cpp +++ b/momentum/character_sequence_solver/multipose_solver_function.cpp @@ -240,7 +240,7 @@ double MultiposeSolverFunctionT::getJacobian( Eigen::MatrixX& jacobian, Eigen::VectorX& residual, size_t& actualRows) { - MT_PROFILE_EVENT("GetMultiposeJacobian"); + MT_PROFILE_FUNCTION(); // update states MT_CHECK( universal_.size() == diff --git a/momentum/character_sequence_solver/sequence_solver.cpp b/momentum/character_sequence_solver/sequence_solver.cpp index 54acf6a3..5352df5b 100644 --- a/momentum/character_sequence_solver/sequence_solver.cpp +++ b/momentum/character_sequence_solver/sequence_solver.cpp @@ -60,7 +60,7 @@ void SequenceSolverT::setOptions(const SolverOptions& options) { template void SequenceSolverT::initializeSolver() { - MT_PROFILE_EVENT("SequenceSolver_initializeSolver"); + MT_PROFILE_FUNCTION(); auto* fn = dynamic_cast*>(this->solverFunction_); MT_CHECK(fn != nullptr); @@ -441,7 +441,7 @@ double SequenceSolverT::processSequenceErrors_serial( template void SequenceSolverT::doIteration() { - MT_PROFILE_EVENT("SequenceSolver_doIteration"); + MT_PROFILE_FUNCTION(); auto* fn = dynamic_cast*>(this->solverFunction_); MT_CHECK(fn != nullptr); diff --git a/momentum/character_sequence_solver/state_sequence_error_function.cpp b/momentum/character_sequence_solver/state_sequence_error_function.cpp index de840e4c..6909e418 100644 --- a/momentum/character_sequence_solver/state_sequence_error_function.cpp +++ b/momentum/character_sequence_solver/state_sequence_error_function.cpp @@ -51,7 +51,7 @@ template double StateSequenceErrorFunctionT::getError( gsl::span> /* modelParameters */, gsl::span> skelStates) const { - MT_PROFILE_EVENT("StateSequenceError: getError"); + MT_PROFILE_FUNCTION(); // loop over all joints and check for smoothness double error = 0.0; @@ -88,7 +88,7 @@ double StateSequenceErrorFunctionT::getGradient( gsl::span> /* modelParameters */, gsl::span> skelStates, Eigen::Ref> gradient) const { - MT_PROFILE_EVENT("StateSequenceError: getGradient"); + MT_PROFILE_FUNCTION(); MT_CHECK(skelStates.size() == 2); const auto& prevState = skelStates[0]; @@ -211,7 +211,7 @@ double StateSequenceErrorFunctionT::getJacobian( Eigen::Ref> jacobian_full, Eigen::Ref> residual_full, int& usedRows) const { - MT_PROFILE_EVENT("StateSequenceError: getJacobian"); + MT_PROFILE_FUNCTION(); MT_CHECK(skelStates.size() == 2); const auto& prevState = skelStates[0]; diff --git a/momentum/character_solver/aim_error_function.cpp b/momentum/character_solver/aim_error_function.cpp index 828378e5..e1e5851a 100644 --- a/momentum/character_solver/aim_error_function.cpp +++ b/momentum/character_solver/aim_error_function.cpp @@ -21,7 +21,7 @@ void AimDistErrorFunctionT::evalFunction( Vector3& f, optional_ref, 2>> v, optional_ref, 2>> dfdv) const { - MT_PROFILE_EVENT("AimDist: evalFunction"); + MT_PROFILE_FUNCTION(); const AimDataT& constr = this->constraints_[constrIndex]; const Vector3 point = state.transformation * constr.localPoint; @@ -52,7 +52,7 @@ void AimDirErrorFunctionT::evalFunction( Vector3& f, optional_ref, 2>> v, optional_ref, 2>> dfdv) const { - MT_PROFILE_EVENT("AimDir: evalFunction"); + MT_PROFILE_FUNCTION(); const AimDataT& constr = this->constraints_[constrIndex]; const Vector3 point = state.transformation * constr.localPoint; diff --git a/momentum/character_solver/collision_error_function.cpp b/momentum/character_solver/collision_error_function.cpp index 818101fa..23e12e40 100644 --- a/momentum/character_solver/collision_error_function.cpp +++ b/momentum/character_solver/collision_error_function.cpp @@ -420,7 +420,7 @@ double CollisionErrorFunctionT::getJacobian( Ref> jacobian, Ref> residual, int& usedRows) { - MT_PROFILE_EVENT("Collision: getJacobian"); + MT_PROFILE_FUNCTION(); MT_CHECK( jacobian.rows() >= gsl::narrow(getJacobianSize()), "Jacobian rows mismatch: Actual {}, Expected {}", diff --git a/momentum/character_solver/collision_error_function_stateless.cpp b/momentum/character_solver/collision_error_function_stateless.cpp index 581e4394..4457e2c7 100644 --- a/momentum/character_solver/collision_error_function_stateless.cpp +++ b/momentum/character_solver/collision_error_function_stateless.cpp @@ -344,7 +344,7 @@ double CollisionErrorFunctionStatelessT::getJacobian( Ref> jacobian, Ref> residual, int& usedRows) { - MT_PROFILE_EVENT("Collision: getJacobian"); + MT_PROFILE_FUNCTION(); MT_CHECK( jacobian.rows() >= gsl::narrow(collisionPairs.size()), "Jacobian rows mismatch: Actual {}, Expected {}", diff --git a/momentum/character_solver/constraint_error_function-inl.h b/momentum/character_solver/constraint_error_function-inl.h index f2c3ec88..75feb6e8 100644 --- a/momentum/character_solver/constraint_error_function-inl.h +++ b/momentum/character_solver/constraint_error_function-inl.h @@ -31,7 +31,7 @@ template double ConstraintErrorFunctionT::getError( const ModelParametersT& /* params */, const SkeletonStateT& state) { - MT_PROFILE_EVENT("Constraint: getError"); + MT_PROFILE_FUNCTION(); // loop over all constraints and calculate the error FuncType f; @@ -174,7 +174,7 @@ double ConstraintErrorFunctionT::getJacobian( Ref> jacobian, Ref> residual, int& usedRows) { - MT_PROFILE_EVENT("Constraint: getJacobian"); + MT_PROFILE_FUNCTION(); usedRows = getJacobianSize(); double error = 0.0; @@ -298,7 +298,7 @@ double ConstraintErrorFunctionT::getGradient( const ModelParametersT& /*unused*/, const SkeletonStateT& state, Ref> gradient) { - MT_PROFILE_EVENT("Contraint: getGradient"); + MT_PROFILE_FUNCTION(); // initialize joint gradients storage jointGrad_.setZero(); diff --git a/momentum/character_solver/fixed_axis_error_function.cpp b/momentum/character_solver/fixed_axis_error_function.cpp index 3083b078..4e1c6580 100644 --- a/momentum/character_solver/fixed_axis_error_function.cpp +++ b/momentum/character_solver/fixed_axis_error_function.cpp @@ -21,7 +21,7 @@ void FixedAxisDiffErrorFunctionT::evalFunction( Vector3& f, optional_ref, 1>> v, optional_ref, 1>> dfdv) const { - MT_PROFILE_EVENT("FixedAxis Diff: evalFunction"); + MT_PROFILE_FUNCTION(); const FixedAxisDataT& constr = this->constraints_[constrIndex]; Vector3 vec = state.rotation() * constr.localAxis; @@ -41,7 +41,7 @@ void FixedAxisCosErrorFunctionT::evalFunction( Vector& f, optional_ref, 1>> v, optional_ref, 1>> dfdv) const { - MT_PROFILE_EVENT("FixedAxis Cos: evalFunction"); + MT_PROFILE_FUNCTION(); const FixedAxisDataT& constr = this->constraints_[constrIndex]; Vector3 vec = state.rotation() * constr.localAxis; @@ -61,7 +61,7 @@ void FixedAxisAngleErrorFunctionT::evalFunction( Vector& f, optional_ref, 1>> v, optional_ref, 1>> dfdv) const { - MT_PROFILE_EVENT("FixedAxis Angle: evalFunction"); + MT_PROFILE_FUNCTION(); const FixedAxisDataT& constr = this->constraints_[constrIndex]; Vector3 vec = state.rotation() * constr.localAxis; diff --git a/momentum/character_solver/limit_error_function.cpp b/momentum/character_solver/limit_error_function.cpp index 0859aebe..b6ec0644 100644 --- a/momentum/character_solver/limit_error_function.cpp +++ b/momentum/character_solver/limit_error_function.cpp @@ -40,13 +40,13 @@ template double LimitErrorFunctionT::getError( const ModelParametersT& params, const SkeletonStateT& state) { + MT_PROFILE_FUNCTION(); + // check all is valid MT_CHECK( state.jointParameters.size() == gsl::narrow(this->skeleton_.joints.size() * kParametersPerJoint)); - MT_PROFILE_EVENT("Limit: getError"); - // loop over all joints and check for limit violations double error = 0.0; @@ -182,7 +182,7 @@ double LimitErrorFunctionT::getGradient( const ModelParametersT& params, const SkeletonStateT& state, Eigen::Ref> gradient) { - MT_PROFILE_EVENT("Limit: getGradient"); + MT_PROFILE_FUNCTION(); const auto& parameterTransform = this->parameterTransform_; @@ -422,7 +422,7 @@ double LimitErrorFunctionT::getJacobian( Eigen::Ref> jacobian, Eigen::Ref> residual, int& usedRows) { - MT_PROFILE_EVENT("Limit: getJacobian"); + MT_PROFILE_FUNCTION(); const auto& parameterTransform = this->parameterTransform_; diff --git a/momentum/character_solver/model_parameters_error_function.cpp b/momentum/character_solver/model_parameters_error_function.cpp index b7dad65f..ccedb14c 100644 --- a/momentum/character_solver/model_parameters_error_function.cpp +++ b/momentum/character_solver/model_parameters_error_function.cpp @@ -96,7 +96,7 @@ double ModelParametersErrorFunctionT::getJacobian( Ref> jacobian, Ref> residual, int& usedRows) { - MT_PROFILE_EVENT("MotionError: getJacobian"); + MT_PROFILE_FUNCTION(); usedRows = 0; diff --git a/momentum/character_solver/normal_error_function.cpp b/momentum/character_solver/normal_error_function.cpp index 1b5d2c01..6d7b5405 100644 --- a/momentum/character_solver/normal_error_function.cpp +++ b/momentum/character_solver/normal_error_function.cpp @@ -21,7 +21,7 @@ void NormalErrorFunctionT::evalFunction( Vector& f, optional_ref, 2>> v, optional_ref, 2>> dfdv) const { - MT_PROFILE_EVENT("Normal: evalFunction"); + MT_PROFILE_FUNCTION(); const NormalDataT& constr = this->constraints_[constrIndex]; Vector3 point = state.transformation * constr.localPoint; diff --git a/momentum/character_solver/orientation_error_function.cpp b/momentum/character_solver/orientation_error_function.cpp index f6fce90c..36674b8f 100644 --- a/momentum/character_solver/orientation_error_function.cpp +++ b/momentum/character_solver/orientation_error_function.cpp @@ -23,7 +23,7 @@ void OrientationErrorFunctionT::evalFunction( Vector& f, optional_ref, 3>> v, optional_ref, 3>> dfdv) const { - MT_PROFILE_EVENT("Orientation: evalFunction"); + MT_PROFILE_FUNCTION(); const OrientationDataT& constr = this->constraints_[constrIndex]; Matrix3 vec = state.rotation() * constr.offset.toRotationMatrix(); diff --git a/momentum/character_solver/plane_error_function.cpp b/momentum/character_solver/plane_error_function.cpp index 1ec0cc37..6337156e 100644 --- a/momentum/character_solver/plane_error_function.cpp +++ b/momentum/character_solver/plane_error_function.cpp @@ -58,7 +58,7 @@ void PlaneErrorFunctionT::evalFunction( Vector& f, optional_ref, 1>> v, optional_ref, 1>> dfdv) const { - MT_PROFILE_EVENT("Plane: evalFunction"); + MT_PROFILE_FUNCTION(); const PlaneDataT& constr = this->constraints_[constrIndex]; Vector3 vec = state.transformation * constr.offset; diff --git a/momentum/character_solver/pose_prior_error_function.cpp b/momentum/character_solver/pose_prior_error_function.cpp index c08a846f..520bf5ac 100644 --- a/momentum/character_solver/pose_prior_error_function.cpp +++ b/momentum/character_solver/pose_prior_error_function.cpp @@ -96,7 +96,7 @@ double PosePriorErrorFunctionT::getGradient( const ModelParametersT& params, const SkeletonStateT& /* state */, Eigen::Ref> gradient) { - MT_PROFILE_EVENT("PosePrior: getGradient"); + MT_PROFILE_FUNCTION(); // loop over all joints and check for smoothness double error = 0.0; @@ -149,7 +149,7 @@ double PosePriorErrorFunctionT::getJacobian( Eigen::Ref> jacobian, Eigen::Ref> residual, int& usedRows) { - MT_PROFILE_EVENT("PosePrior: getJacobian"); + MT_PROFILE_FUNCTION(); // loop over all joints and check for smoothness double error = 0.0; diff --git a/momentum/character_solver/position_error_function.cpp b/momentum/character_solver/position_error_function.cpp index aa5794e3..8f73b8dd 100644 --- a/momentum/character_solver/position_error_function.cpp +++ b/momentum/character_solver/position_error_function.cpp @@ -23,7 +23,7 @@ void PositionErrorFunctionT::evalFunction( Vector3& f, optional_ref, 1>> v, optional_ref, 1>> dfdv) const { - MT_PROFILE_EVENT("Position: evalFunction"); + MT_PROFILE_FUNCTION(); const PositionDataT& constr = this->constraints_[constrIndex]; Vector3 vec = state.transformation * constr.offset; diff --git a/momentum/character_solver/simd_normal_error_function.cpp b/momentum/character_solver/simd_normal_error_function.cpp index aabc981d..86837959 100644 --- a/momentum/character_solver/simd_normal_error_function.cpp +++ b/momentum/character_solver/simd_normal_error_function.cpp @@ -287,7 +287,7 @@ double SimdNormalErrorFunction::getJacobian( Ref jacobian, Ref residual, int& usedRows) { - MT_PROFILE_EVENT("SimdJacobian"); + MT_PROFILE_FUNCTION(); MT_CHECK(jacobian.cols() == static_cast(parameterTransform_.transform.cols())); if (constraints_ == nullptr) { @@ -441,7 +441,7 @@ double SimdNormalErrorFunctionAVX::getJacobian( Ref jacobian, Ref residual, int& usedRows) { - MT_PROFILE_EVENT("SimdJacobian"); + MT_PROFILE_FUNCTION(); MT_CHECK(jacobian.cols() == static_cast(parameterTransform_.transform.cols())); if (constraints_ == nullptr) { diff --git a/momentum/character_solver/simd_plane_error_function.cpp b/momentum/character_solver/simd_plane_error_function.cpp index 3c728ea7..ea3c3336 100644 --- a/momentum/character_solver/simd_plane_error_function.cpp +++ b/momentum/character_solver/simd_plane_error_function.cpp @@ -304,7 +304,7 @@ double SimdPlaneErrorFunction::getJacobian( Ref jacobian, Ref residual, int& usedRows) { - MT_PROFILE_EVENT("SimdJacobian"); + MT_PROFILE_FUNCTION(); MT_CHECK(jacobian.cols() == static_cast(parameterTransform_.transform.cols())); if (constraints_ == nullptr) { @@ -747,7 +747,7 @@ double SimdPlaneErrorFunctionAVX::getJacobian( Ref jacobian, Ref residual, int& usedRows) { - MT_PROFILE_EVENT("SimdJacobian"); + MT_PROFILE_FUNCTION(); MT_CHECK(jacobian.cols() == static_cast(parameterTransform_.transform.cols())); if (constraints_ == nullptr) { diff --git a/momentum/character_solver/simd_position_error_function.cpp b/momentum/character_solver/simd_position_error_function.cpp index 7de92902..953171fe 100644 --- a/momentum/character_solver/simd_position_error_function.cpp +++ b/momentum/character_solver/simd_position_error_function.cpp @@ -299,11 +299,12 @@ double SimdPositionErrorFunction::getJacobian( Ref jacobian, Ref residual, int& usedRows) { + MT_PROFILE_FUNCTION(); + if (constraints_ == nullptr) { return 0.0f; } - MT_PROFILE_EVENT("SimdJacobian"); MT_CHECK(jacobian.cols() == static_cast(parameterTransform_.transform.cols())); MT_CHECK((size_t)constraints_->numJoints <= jacobianOffset_.size()); diff --git a/momentum/character_solver/skeleton_solver_function.cpp b/momentum/character_solver/skeleton_solver_function.cpp index d0933ce6..cae5f068 100644 --- a/momentum/character_solver/skeleton_solver_function.cpp +++ b/momentum/character_solver/skeleton_solver_function.cpp @@ -88,7 +88,7 @@ double SkeletonSolverFunctionT::getGradient( template std::pair> getDimensions( const std::vector>>& error_func) { - MT_PROFILE_EVENT("GetJacobianSize"); + MT_PROFILE_FUNCTION(); std::vector offset(error_func.size()); size_t jacobianSize = 0; for (size_t i = 0; i < error_func.size(); i++) { @@ -111,9 +111,9 @@ double SkeletonSolverFunctionT::getJacobian( Eigen::MatrixX& jacobian, Eigen::VectorX& residual, size_t& actualRows) { - // update the state according to the transformed parameters - MT_PROFILE_EVENT("GetSkeletonJacobian"); + MT_PROFILE_FUNCTION(); + // update the state according to the transformed parameters { MT_PROFILE_EVENT("Skeleton: set state"); state_->set(parameterTransform_->apply(parameters), *skeleton_); @@ -167,7 +167,7 @@ double SkeletonSolverFunctionT::getJtJR( const Eigen::VectorX& parameters, Eigen::MatrixX& JtJ, Eigen::VectorX& JtR) { - MT_PROFILE_EVENT("GetSkeletonJacobian"); + MT_PROFILE_FUNCTION(); // update the state according to the transformed parameters { @@ -247,7 +247,7 @@ double SkeletonSolverFunctionT::getSolverDerivatives( const Eigen::VectorX& parameters, Eigen::MatrixX& hess, Eigen::VectorX& grad) { - MT_PROFILE_EVENT("getSolverDerivativesSkeleton"); + MT_PROFILE_FUNCTION(); // update the state according to the transformed parameters { diff --git a/momentum/character_solver/state_error_function.cpp b/momentum/character_solver/state_error_function.cpp index 810223cc..344a43e8 100644 --- a/momentum/character_solver/state_error_function.cpp +++ b/momentum/character_solver/state_error_function.cpp @@ -87,7 +87,7 @@ template double StateErrorFunctionT::getError( const ModelParametersT& params, const SkeletonStateT& state) { - MT_PROFILE_EVENT("StateError: getError"); + MT_PROFILE_FUNCTION(); if (state.jointState.empty()) return 0.0; @@ -136,7 +136,7 @@ double StateErrorFunctionT::getGradient( const ModelParametersT& params, const SkeletonStateT& state, Ref> gradient) { - MT_PROFILE_EVENT("StateError: getGradient"); + MT_PROFILE_FUNCTION(); if (state.jointState.empty()) return 0.0; @@ -259,7 +259,7 @@ double StateErrorFunctionT::getJacobian( Eigen::Ref> jacobian, Eigen::Ref> residual, int& usedRows) { - MT_PROFILE_EVENT("StateError: getJacobian"); + MT_PROFILE_FUNCTION(); // loop over all constraints and calculate the error double error = 0.0; diff --git a/momentum/character_solver/vertex_error_function.cpp b/momentum/character_solver/vertex_error_function.cpp index f5aa5eac..c49adba4 100644 --- a/momentum/character_solver/vertex_error_function.cpp +++ b/momentum/character_solver/vertex_error_function.cpp @@ -67,7 +67,7 @@ template double VertexErrorFunctionT::getError( const ModelParametersT& modelParameters, const SkeletonStateT& state) { - MT_PROFILE_EVENT("VertexErrorFunction - getError"); + MT_PROFILE_FUNCTION(); updateMeshes(modelParameters, state); diff --git a/momentum/solver/gauss_newton_solver.cpp b/momentum/solver/gauss_newton_solver.cpp index e1712016..4f08636e 100644 --- a/momentum/solver/gauss_newton_solver.cpp +++ b/momentum/solver/gauss_newton_solver.cpp @@ -54,7 +54,7 @@ void GaussNewtonSolverT::initializeSolver() { template void GaussNewtonSolverT::doIteration() { - MT_PROFILE_EVENT("Solver: GaussNewtonIteration"); + MT_PROFILE_FUNCTION(); if (denseIteration_) { doIterationDense(); } else { diff --git a/momentum/solver/gradient_descent_solver.cpp b/momentum/solver/gradient_descent_solver.cpp index ca7da08e..656e954f 100644 --- a/momentum/solver/gradient_descent_solver.cpp +++ b/momentum/solver/gradient_descent_solver.cpp @@ -43,7 +43,7 @@ void GradientDescentSolverT::initializeSolver() {} template void GradientDescentSolverT::doIteration() { - MT_PROFILE_EVENT("Solver: GradientDescentIteration"); + MT_PROFILE_FUNCTION(); this->error_ = this->solverFunction_->getGradient(this->parameters_, gradient_); this->solverFunction_->updateParameters(this->parameters_, gradient_ * learningRate_); } diff --git a/momentum/solver/subset_gauss_newton_solver.cpp b/momentum/solver/subset_gauss_newton_solver.cpp index 9077a3d3..c710c3ed 100644 --- a/momentum/solver/subset_gauss_newton_solver.cpp +++ b/momentum/solver/subset_gauss_newton_solver.cpp @@ -68,7 +68,7 @@ void SubsetGaussNewtonSolverT::setEnabledParameters(const ParameterSet& param template void SubsetGaussNewtonSolverT::doIteration() { - MT_PROFILE_EVENT("Solver: doIteration"); + MT_PROFILE_FUNCTION(); // get the jacobian and residual size_t jacobianRows = 0;