So, you walk up to a random person and you say "I've seen you around so I should know your name". Then, you walk away. Yeah, smooth. And totally not weird
If you want to make "friends" at the gym, just be a normal person and initiate a gym related conversation with someone that's next to you. Or just don't make friends at all cause it's the gym and nobody cares?