Grass Knot seems best suited for Special Infernape.
HP Ice and Electric hit some of the opposition super effectively, sure, but Ice hits Grass, Ground, Dragon, and Flying super effectively, whereas Electric nails Water and Flying. Typically, neither of these types of hidden power are that much better than Grass Knot (which is great against Water, Ground, and Rock), given that either Fire Blast or Focus Blast or any other STAB move hits quite powerfully, specially after a Nasty Plot boost. Further, a lot of the Pokemon that are good in competitively are quite heavy, so most of them take at least 60 base power damage, while a good portion take 80 or even more. While Grass isn't a great type competitively speaking, the few Pokemon that can counter and give Infernape a hard time (specially in UU), such as bulky water types, dislike Grass Knot massively. An exception may be Latias, but U-turn or switching out is generally the better play rather than HP Ice.
In OU, Infernape is generally outclassed by a number of Pokemon, but even if you do manage to predict a switch, Grass Knot hits both Keldeo and Greninja for a decent 60 base damage power, same as Hidden Power, thus making it just as effective.