Is there a commonly accepted rule about who yields when 2 riders, who are riding opposite directions, meet each other on a hill? Which rider should pull off to let the other pass?

As a new technical rider, I've been yielding the trail when I meet other riders regardless of which direction I'm going. The other day I pulled off while I was heading up a steep hill & had a devil of a time getting going again. Should I really be yielding when I'm riding uphill?