You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
In running few experiments using the BP, I came to an issue where whether we disable BP or not, it does not have any impact on the results.
Looking into the issue, I found that in the frontend_c::predict_bpu function, the BP disabled path has no impact in case of CPU (I am also not very sure how it works on the GPU case): if (*m_simBase->m_knobs->KNOB_USE_BRANCH_PREDICTION) { // do nothing } // no branch prediction else { // GPU : stall on branch policy, stop fetching if (m_ptx_sim && *m_simBase->m_knobs->KNOB_MT_NO_FETCH_BR) { set_br_wait(uop->m_thread_id); mispredicted = false; } }
My understanding from the flow that is should return mispredicted = true if BP was disabled?
Although semantically disabling BP is not the same as misprediction but this is the closest I can get form the code?
right now simply disabling BP has no impact.
In the meantime, I did something like: if (*m_simBase->m_knobs->KNOB_USE_BRANCH_PREDICTION) { // do nothing } // no branch prediction else { // GPU : stall on branch policy, stop fetching if (m_ptx_sim && *m_simBase->m_knobs->KNOB_MT_NO_FETCH_BR) { set_br_wait(uop->m_thread_id); mispredicted = false; } else { //CPU x86 path should return misprediction in case that bp is disabled! mispredicted = true; } }
Not sure if this is what originally the code intended or not.
Mohamed
The text was updated successfully, but these errors were encountered:
Hello,
In running few experiments using the BP, I came to an issue where whether we disable BP or not, it does not have any impact on the results.
Looking into the issue, I found that in the
frontend_c::predict_bpu
function, the BP disabled path has no impact in case of CPU (I am also not very sure how it works on the GPU case):if (*m_simBase->m_knobs->KNOB_USE_BRANCH_PREDICTION) { // do nothing } // no branch prediction else { // GPU : stall on branch policy, stop fetching if (m_ptx_sim && *m_simBase->m_knobs->KNOB_MT_NO_FETCH_BR) { set_br_wait(uop->m_thread_id); mispredicted = false; } }
My understanding from the flow that is should return mispredicted = true if BP was disabled?
Although semantically disabling BP is not the same as misprediction but this is the closest I can get form the code?
right now simply disabling BP has no impact.
In the meantime, I did something like:
if (*m_simBase->m_knobs->KNOB_USE_BRANCH_PREDICTION) { // do nothing } // no branch prediction else { // GPU : stall on branch policy, stop fetching if (m_ptx_sim && *m_simBase->m_knobs->KNOB_MT_NO_FETCH_BR) { set_br_wait(uop->m_thread_id); mispredicted = false; } else { //CPU x86 path should return misprediction in case that bp is disabled! mispredicted = true; } }
Not sure if this is what originally the code intended or not.
Mohamed
The text was updated successfully, but these errors were encountered: