I'll answer your question directly and then throw in my $.02. Most schools look at your entire GPA AND your major GPA. They use this as part of their holistic approach at gauging you as a potential contributor to their research base. Some schools do not care about your major GPA, they want to see how well rounded you are. I know from personal experience that USC looks at the entire GPA and, unfortunately, rarely admits those with a cumulative GPA below 3.5 into their STEM grad programs (not to mention that they also usually don't fund grad students, a right they reserve for their PhD students solely). Now my$.02 :