  We study the thermodynamic topology of four dimensional dyonic Anti-de-Sitter(AdS) black hole in three different ensembles: canonical, mixed and grand canonical ensemble. While canonical ensemble refers to the ensemble with fixed electric and magnetic charges, mixed ensemble is an ensemble where we fix magnetic charge and electric potential. In the grand canonical ensemble, potentials corresponding to both electric and magnetic charges are kept fixed. In each of these ensembles, we first compute the topological charges associated with critical points. We find that while in both canonical and mixed ensembles, there exists one conventional critical point with topological charge $-1$, in the grand canonical ensemble, we find no critical point. Then, we consider the dyonic AdS black hole as topological defects in thermodynamic space and study its local and global topology by computing the winding numbers at the defects. We observe that while the topologies of the black hole in canonical and mixed ensembles are identical with total topological charge equaling $1$, in the grand canonical ensemble, depending on the values of potentials, the total topological charge is either equal to $0$ or $1$. In canonical and mixed ensembles, either one generation and one annihilation points or no generation/annihilation points are found. In the grand canonical ensemble, depending on the values of potentials, we find either one generation point or no generation/annihilation point. Thus, we infer that the topological class of $4$D dyonic AdS black hole is ensemble dependent. 
Thermodynamic topology of 4D Dyonic AdS black holes in different   ensembles