If you get a divorce, you must inform the Home Office as soon as you can.  Since your permission in the UK is based on a marriage visa, the Home Office will issue a Spouse Visa curtailment, which permits enough time to make a new application under a new route to stay in the UK, or you will have to leave the country, and return to Canada.