EXHIBIT 23.1 CONSENT OF ERNST & YOUNG LLP, INDEPENDENT AUDITORS We consent to the incorporation by reference in the Registration Statement on Forms S-8 (Nos. 333-04839 and 333-34681) pertaining to the 1996 Employee Stock Purchase Plan, the 1996 Non-Employee Directors' Stock Option Plan and the 1996 Equity Incentive Plan of Onyx Pharmaceuticals, Inc. of our report dated February 20, 1998, with respect to the financial statements of Onyx Pharmaceuticals, Inc. included in this Annual Report (Form 10-K) for the year ended December 31, 1997. ERNST & YOUNG LLP Palo Alto, California March 30, 1998 57