Tesla's been in "production Hell" for the past nine months as it attempts to ramp up the Model 3. On Tuesday, Tesla CEO Elon Musk took to Twitter to announce the Silicon Valley automaker is letting go 9 percent of its workforce.

Musk noted that no production workers would be let go to ensure that Model 3 production would not be affected by the cuts. Instead, the cuts are coming mostly from the salaried workforce.

As of Tesla's annual filing in December, the automaker had 37,543 full-time employees. That means about 3,379 employees are getting a pink slip.

Musk tweeted screen shots of his company-wide email announcement stating the reorganization that is underway is hard but necessary.

In the company-wide email, Musk noted the move is necessary to reduce costs and become profitable. He even acknowledged the company has never turned a profit in its almost 15 years of existence.

Last week Musk told shareholders he expected Model 3 production to hit 5,000 units a week by the end of the month, and the Model Y should be unveiled in March 2019 and go into production a year later. He went on to set even wilder expectations for the Semi and Roadster than previously announced in terms of range and performance.

In addition to the layoffs, Musk announced that Tesla will not be renewing an agreement with Home Depot, which was helping sell solar-powered equipment. Those products will be sold in Tesla retail locations, and Musk said the employees at Home Depot will have the ability to move over to Tesla retail locations.