It really depends on how you feel about it.
I know guys who do some reps with th bar. Then do singles up to their max.
I also know guys who do a 15 min dynamic warm-up. Then go to the exercise they are going to max and do singles up to their max.
Personally I do the second option. More if a whole body warm-up first then a specific warm-up for the exercise I am going to max.
If you are new to maxing, take the second option. You are better off with too much warm-up than not enough.