Loss compensated optical switching includes an optical crossbar switch and a wafer bonded semiconductor amplifier (SOA). The optical crossbar switch has a plurality of input ports and a plurality of output ports and is on a substrate of a first semiconductor material. The wafer bonded SOA includes a layer of second semiconductor material that is wafer bonded to a surface of the substrate such that a portion of the wafer bonded SOA semiconductor material layer overlies a portion of a port of the plurality of input ports. The second semiconductor material of the wafer bonded SOA is different from the first semiconductor material of the substrate.