No, he didn't
In the official screenplay, Graves' taunting occurs in scene 96. In scene 94, just before Credence and Graves apparate to the tenement house (where the taunting occurs), Graves still thinks the Obscurial is female:
FOCUS ON CREDENCE, cowering at the back of the church, whimpering and clutching his pendant of the Deathly Hallows. Graves steps quickly toward him, bends down, cradling Credence’s head. However, there’s little tenderness to his voice as he speaks:
Graves: The Obscurial — was here? Where did she go?
Fantastic Beasts and Where to Find Them: The Official Screenplay
In fact, this is the reason Graves is so cruel to Credence: not that he's trying to provoke Credence, but because he believes has no further use for him; as far as Graves knows, the Obscurial is in the very next room.
Graves: Where is she?
Credence looks down — at a loss.
Credence: I don't know.
Graves becomes increasingly impatient — he's so close to his goal. He marches forward into one of the rooms
Graves: (contemptuous) You’re a Squib, Credence. I could smell it off you the minute I met you.
[...]
Graves: I'm done with you.
Fantastic Beasts and Where to Find Them: The Official Screenplay
In fact, it's telling what goes through Graves' mind when Credence does start to reveal himself:
As each wall collapses in front of him, he is transfixed, elated, yet also aware that he has made a colossal error...
Fantastic Beasts and Where to Find Them: The Official Screenplay