In several commercial network processors programming environments, programmer must manually assign many processing tasks to the processor pipelines which consist of many processing engines. Due to the large exploration space, this manual procedure is usually very tedious and inefficient and the optimal or even near-optimal assignment scheme may be difficult to obtain. This paper proposes an automated task-to-PE assignment algorithm based on genetic algorithm. Experimental results show that this method can quickly obtain nearoptimal solutions from the large solution space and the algorithm execution time is decoupled with pipeline stages. These two features make this method very suitable to be used in a NP application development environment and provide a more efficient development experience for developers.