Search giant also revved up its spending on data centres as it competes in artificial intelligence race