IBM has agreed to pay $17 million to settle a US government probe over the firm's diversity, equity and inclusion practices, which President Donald Trump's administration has cracked down on during his second term in office.