The onshore yuan weakened against the dollar in the Asian session as China loosened its grip on the Chinese currency.