Hong Kong stocks rally on AI optimism, while mainland China markets edge higher amid lingering trade war fears.