The memory chip maker topped expectations as AI-driven demand for memory boosted revenue and profit forecasts for the new quarter.