How does libcufile choose between compatibility mode and GDS mode

Hi there, how does libcufile choose between compatibility mode and GDS mode? And under what conditions to make this decision? by the way, is libcufile an open source or closed source ? Thanks.