Tech Mahindra led the Nifty gainers, followed by Infosys, HCL Tech and Wipro