How do you define a non-load bearing wall? Well that's a wall that supports nothing....no ceiling joist, no purlin brace....nothing. That's rare unless the building is all trusses.
There is a code for a bearing partition supported by floor joists. There isn't a code for non-bearing. However there is a conundrum of nailing a wall down.
Is it okay to nail the wall bottom plate to nothing more than floor sheathing?
What happens when a heavy clothes dresser is against the wall and it is mid-span between joists? The answer to that is deflection. I can't be trusted to do the right thing so I always ask for a pair of joists under partition walls that are parallel to the joists and double full depth blocking if the partitions are perpendicular to the joists.
R502.4 Joists under bearing partitions. Joists under parallel
bearing partitions shall be of adequate size to support the
load. Double joists, sized to adequately support the load, that
are separated to permit the installation of piping or vents shall
be full depth solid blocked with lumber not less than 2 inches
(51 mm) in nominal thickness spaced not more than 4 feet
(1219 mm) on center. Bearing partitions perpendicular to
joists shall not be offset from supporting girders, walls or partitions
more than the joist depth unless such joists are of sufficient
size to carry the additional load.