Write a memo to your boss, making the case
Writing a memo to your boss can be a challenging task
Put it in writing! Write a memo addressed to both your boss and your boss's boss. Explain that, because you have been given conflicting instructions, you cannot proceed until they agree on what they want you to do. List the company goals you're working to accomplish and explain how this delay is working against those goals and hurting the organization.
Writing a memo to your boss does not constitute completed staff work
But that may not be the end of it. Suppose your boss's boss then says to you, "I read your memo; I'm the senior manager so you must follow my instructions." It happens. So what do you do now? You write another memo addressed to both your boss and your boss's boss. Tell them that you asked for their agreement in your first message and you still haven't gotten it—you still have only one manager's instructions. End your memo by asking, "Would it be helpful if I escalated this issue to our executive for a decision?" They'll probably want to avoid that, so they just might work out their problems without forcing you to do it for them.