We present a general approach for studying the dynamics of domain walls in biaxial ferromagnetic stripes with functionally graded Dzyaloshinskii-Moriya interaction (DMI). By engineering the spatial profile of the DMI parameter we propose the concept of a diode, which implements filtering of domain walls of certain topological charge and helicity. We base our study on phenomenological Landau-Lifshitz-Gilbert equations with additional Zhang-Li spin-transfer terms using a collective variable approach. In the effective equations of motion the gradients of DMI play the role of a driving force which competes with current driving. All analytical predictions are confirmed by numerical simulations.