No system-wide setting as applications need to handle XInput 2.1 events themselves or use a toolkit that does it automatically.
Gnome/GTK3 applications handle smooth or pixel-perfect scrolling by default.
Firefox requires setting an environment variable MOZ_USE_XINPUT2
(echo 'export MOZ_USE_XINPUT2=1' >> ~/.xsessionrc
).
Chromium introduced it recently in version 54 and you will need to install it from an a source that is more up-to-date than Ubuntu's repositories.
KDE/QT apps apparently have support though I haven't tried.
Electron-based apps (such as Atom) don't have any support for XInput 2.1 events yet.