SafeWork NSW is investigating a building collapse that forced the evacuation of two sites in Sydney's inner west on Monday, scattering bricks onto the road and burying parked cars under fallen signs and rubble.

Emergency services crews were called to the building, next to a construction site, on New Canterbury Road at Dulwich Hill about 11.45am, a NSW Police spokeswoman said.

"Police evacuated the building and a neighbouring building as a precaution," the spokeswoman said. "All workers have been accounted for and there were no injuries."

The tumbling building also brought down electricity wires and was slowing eastbound traffic between Canterbury Road and Melford Street about 2.30pm, according to Live Traffic NSW.