US stocks rise as tech shares rally