Editor’s note: Vivek Wadhwa is a former technology entrepreneur in the Triangle who now is an author, columnist and a Distinguished Fellow at Harvard Law School and Carnegie Mellon University at Silicon Valley. He is a regular contributor to WRAL TechWire.  This post is an edited version of a speech the author delivered at Silicon Valley Forums Visionary Awards last week. A video of the event is included with this post.

SAN FRANCISCO – When Silicon Valley Forum informed me I was to be a recipient of its 21st visionary awards, I was in disbelief. I have long been a critic of the ways of Silicon Valley and am clearly not in the same league as the 100 or so past recipients, who include Bill Gates, Elon Musk, Andy Groove, and Gordon Moore. But the Valley makes its own rules.

I came to Silicon Valley in 2009 to research its competitive advantages. In particular, I was trying to understand why foreign-born people such as I had achieved so much success. My research team at Duke University had worked with UC Berkeley’s AnnaLee Saxenian in documenting the role of immigrants in founding more than half of Silicon Valley’s startups from 1995 to 2005.

Our research revealed that what gave the Valley its global advantage was diversity and culture. It is a true melting pot, comprising educated people from every part of the world. It judges people primarily on their skills and capability; it welcomes debate and dissent; and it openly shares information. Silicon Valley is, in effect, a giant social network, joined through competition and cooperation.

I started out as a starry-eyed cheerleader for Silicon Valley but eventually realized that certain critical elements were missing — most notably, women, blacks, and Hispanics. As well, the Valley’s elite actively propagated a stereotype of the tech industry’s most successful: that they were young college dropouts. In fact, as my research team found, the median age of successful tech entrepreneurs was 39; twice as many were over 60 as were under 20; and twice as many were over 50 as were under 25. And they were highly educated.

I wrote a series of articles raising my concern. Though reader feedback was very positive, the articles ignited a firestorm of criticism from the Valley’s moguls. One VC friend pulled me aside to warn me that if I wanted “to make it in Silicon Valley,” I should stop raising these issues.

The stinging criticism from people I had respected made me realize that the problem might be worse than I had feared. But I was hesitant to take on such powerful people. It was my wife, Tavinder, who insisted that I do it. “If you don’t speak up and help these people, who will?” she said. So I did go on the offensive, and eventually, many of the Valley’s tech leaders did listen — and that is the greatness of Silicon Valley: It knows that it is imperfect, and so evolves.

The Valley’s moguls also supported me in my quest to raise the alarm about immigration policy. The U.S. had brought hundreds of thousands of skilled immigrants in on temporary visas without any thought to making available commensurate numbers of permanent-resident visas that would have allowed them to participate in the innovation economy as Americans. Elon Musk, Marc Andreessen, and Reid Hoffman readily endorsed my book, Immigrant Exodus and lent me support.

So Silicon Valley is the master of reinvention and contradiction.

A new reinvention is happening now that is greater than any other. The semiconductors that the Valley created are now powering advances in other fields. Ray Kurzweil says that as any technology becomes information-based, it starts advancing exponentially. That is what is happening to a broad range of technologies such as artificial intelligence, robotics, sensors, and synthetic biology. These are making amazing things possible, including solving the grand challenges of humanity.

We may soon have the ability to generate unlimited, clean, and almost free energy; educate billions through AI and virtual reality; cure or prevent all disease; and grow more than enough food to feed the planet. We really can create the utopian future of Star Trek — 300 years ahead of schedule.

We also have the ability to unleash new horrors: killer robots, runaway AI, engineered viruses. Technologies such as social media, which were supposed to bring the world together and uplift humanity, are being used to divide and polarize. The gap between the haves and the have-nots is widening. Soon, AI and robots will eliminate hundreds of millions of jobs and leave the people who have lost them in despair.

Silicon Valley needs to wake up to the dark side of its inventions and take responsibility for their impacts. The problems won’t solve themselves; policymakers and academics don’t understand enough to take the lead. The creators of the technologies must lead the discussions on ethics, regulations, and controls. We need to come together and find ways of using advancing technologies to uplift humanity rather than destroy it. If we in Silicon Valley don’t do it, who will?