Elon Musk, chief executive of Tesla Motors Inc. and Space Exploration Technologies Inc., says autonomous driving isn’t all that difficult to achieve.

“I view it as a solved problem. We know exactly what to do and we will be there in a few years,” Mr. Musk said at the Nvidia Corp. graphical processor conference in San Jose, Calif., on Tuesday.

A fully autonomous vehicle that is much safer than a person “is much easier than you would think,” he said. “In the distant future people may outlaw driver cars. You can’t have a person operating a two-ton death machine!”

Mr. Musk has said Tesla plans to be the first company to offer customers an autopilot feature. “I think we will be the leader in autonomous cars that you can actually buy,” he said.

Nvidia, which produces visual computing technology, is a supplier to Tesla and provides the processor that helps to power its 17-inch multimedia display and other functions inside the car.