I moved to Toronto, then to SF. Thought I'd also share my anecdata here.
I used to make ~100k/yr CAD (75k/yr USD) when I was in TO around 6 years ago. I bought a house around 7 years ago for 550k. I did a remote stint for a Boulder company for a couple years (~120k/yr USD working from TO), then moved to SF (~200k/yr USD + ~100k/yr equity).
I'm a bit out of the loop w/ TO salaries nowadays, but your 170k CAD definitely seems to be on the very high end of the spectrum.
A few thoughts:
The biggest difference in pay comes from equity. ~100k/yr is pretty normal in SF big tech companies, whereas equity comp in TO is pretty much unheard of unless you're a partner in a company. Caveat: not all SF companies offer liquid equity, or even equity that is worth anything.
Taxes are higher for me working in SF (largely because salaries of comparable positions are higher in SF)
Living costs depend a lot on whether you have a spouse and/or kids. A bunkbed in SF goes for 1.6k/mo if you're single trying to save up. In TO, you can rent a cheap room for $600/mo. But for families: 2 bed condo is ~48k/yr USD, vs ~24k/yr in similar distance in TO. Another very important point: in SF, a foreigner spouse's ability to work can be extremely tricky (e.g. spouse in non-tech field would often not be able be get a work visa sponsorship at all). Canadians can get a TN visa relatively easily, but the H1B visa required for other foreigners isn't guaranteed. Green card timelines range from 2.5 years to virtually impossible to get. By comparison, getting a work visa in Canada is pretty straightforward, and the path to permanent residence is also relatively easy, regardless of country of origin.
Preschool costs ~28k/yr USD per kid in SF, vs ~18k/yr CAD (13k/yr USD)
Healthcare in SF costs me ~3.6k USD/yr base (plus copays/other fees depending on how frequently I actually use it) vs free in TO. Dental and vision costs are similar between SF and TO.
Goods generally cost less in SF. Milk costs ~$5/gallon USD in SF vs $10/4L CAD ($7 USD) in TO.
IMHO: SF is better for saving up while young, Toronto gets pretty attractive once you have a piggy bank to afford housing/build a family.