Pass/Fail Physics for Computer Science

I’m likely getting a B in physics and wanted to P/F it to avoid dropping my GPA. Anyone know if grad schools see physics as a major class or an elective for CS majors?