Pruner: An Efficient Cross-Platform Tensor Compiler with Dual Awareness