You can do either. Slopes in an aquarium tend to level out over time. The particles weigh very little underwater, so water currents and fish disturbances tend to easily move the top particles down to lower areas. If you have the dirt layer sloped, with a uniform thickness of top layer on it, it is possible for the dirt to eventually be exposed at the high points, unless the top layer is thicker than the difference between the high and low spots. For that reason I would limit the slope of the dirt layer, and make sure the top layer is thicker than the difference in thickness of the dirt from high to low. The plant roots can reach the dirt even if the top layer is a couple of inches thick in spots.