China is racing to build a self-sufficient artificial intelligence stack, from cutting edge chips to nationwide deployment, and its leaders now treat that effort with the urgency of a wartime program.