By contemporaries, I mean the other cultures that lived around at the same time and had interactions with the Greeks. For example, the Persian, Egyptians etc.
Well that depends on what views you mean by sex. There are different answers depending on whether or not you mean the reproductive power of sexuality, the nature and purpose of gender/sex, or the social, moral and interpersonal aspects of sexual relations. These things were associated with each other in Antiquity as a part of the human experience and indeed, a gendered experience, but they were not as neatly tied together into a single far-reaching category as they are today.
Edit: Thank you all for the gold and for linking to Depthhub and elsewhere!
I am going to compare and contrast Egypt to focus on just one civilisation and give you an idea. Also mild NSFW warning because I will be discussing sexual interactions and themes in art and literature as well as social norms.
You are probably referring to Greece's reputation for open acceptance of male on male sexual relations and their prioritisation over relationships with women, but I just want to clarify that this was not really the case in ancient Greece, in fact outside of the socially acceptable bounds of pederasty, womanly or submissive sexual behaviour was frowned upon, and anal/oral penetration was often seen as an aggressive and degrading act against a male much like it was viewed in the ancient Near East. Intercrural sex was by an large the most commonly celebrated interaction although the modern imagination might not automatically assume that, and what we would consider homosexual relationships were only tolerated within certain boundaries which both protected the masculinity of both parties while still maintaining the dominant/submissive, active/passive dichotomy that generally defined sexuality in the Graeco-Roman imagination. In Athens, one of the most well-documented and the most influential to modern perceptions of Greece, paederasty was the most common and socially sanctioned homosexual relationship and was between an erastes and an eromenes, a lover and a beloved, who were generally separated by age and experience. Even in Athens paderastic relationships were not romantic entanglements in the strict modern sense of the word and other city-states had varying attitudes towards the acceptability os male/male sexual interactions in varying contexts. Other homoerotic themes frequently factored into mythological stories as well, between the gods and mortals like Apollo and Hyacinthis, and between heroes as in later interpretations of Achilles and Patroclus, as well as Greek art and poetry frequently celebrating the beauty of young males in an erotic (though not necessarily objectifying) manner.
But it is important to mention that individuals at different stages of life had different expectations and ideals placed upon them, so the same youth who accepted the gifts and advances of an older man without being stigmatised would not still be expected to behave in the same manner at say, 50. The same young wife who endeavoured to make herself as sexually appealing as possible would not be expected to behave the same way as an older widow. And the degree of acceptance and prioritisation of male/male relationships was not anywhere near consistent across city-states and centuries, so trying to identify a "Greek" sexuality would be an impossibility even if we ignored the obvious caveat of individual differences.
And yet, it is true that even if we look at pederastic relationships exclusively, male/male sexual relationships were a part of life in many Greek subcultures so it is fair to say that Classical Greek culture as a whole differed from Egyptian culture if only in its obvious multiplicity. What i am going to attempt is to isolate various aspects of sexuality in Egyptian culture but in doing so I am in no way attempting to create a complete overview of the topic (that would require a book) I am only going to take various snapshots of Egypt throughout its history to give a sense of its parallels and differences compared to Classical Greek culture and, admittedly, I will very likely barely scrape the surface of that.
There are mentions of Egyptian cities which outlawed male on male relations and most references of homosexual desire in Egyptian literature are negative. However neatly separating sexuality into binary homosexual/heterosexual categories is difficult whenever we deal with ancient societies that did not include sexual desires as an integral part of identity formation, but rather specific roles and actions. To bring up a mythological precedent, there is the famous story of Horus and Seth, and how a homosexually and competitively charged encounter between uncle and nephew rivals for the throne served to reassert the masculinity and right to rule of the protagonist Horus. Seth, who had previously murdered Horus' father Osiris and sought to usurp the rule of Egypt, attempted to seduce Horus by complimenting his backside and making sexual advances after which it is implied that the two engage in intercrural sex, but Horus catches his uncle's semen by placing his hand between his legs, thereby not allowing him to ejaculate inside of him and then tells his mother Isis who cuts off his hand throws it in the Nile before fashioning him a new one. She then told him to ejaculate on a piece of lettuce (apparently Seth's favourite food and in Egyptian literature it is considered an aphrodisiac due to the native plants phallic attributes) and feed the lettuce to Seth so he is tricked into swallowing Horus' seed. Seth then challenges Horus' right to rule Egypt by informing the other gods of their encounter and accusing Horus of submitting to him, Horus denies this and states that the situation was in fact reversed, when their semen was magically summoned forth in order to ascertain the validity of each claim Seth's emerged from the Nile while Horus' came forth from within Seth and his right to rule was maintained. This provides an interesting parallel to Greek ideas of virtue because the emphasis is on protecting masculinity and dominance within the bounds of sexuality. Although it could also be seen as painting the sterile antagonistic god Seth as not only conniving yet ultimately foolish but as sexually deviant as well, with his literal hunger for the lettuce representing a euphemistic subtext, and under that reading it could be seen as a morality tale decrying homosexuality. But at the same time, various versions of the myth from different time periods alternately place the emphasis on desire or action, and the erotic nature of the interaction does not negatively impact the virtue of Horus in any way, instead it seems like a vehicle for asserting his virility and cleverness as it is clear that Horus is not desirous of Seth and/or did not allow himself to be subdued therefore did not truly transgress.
Thomas A. Dowson in Queering Sex and Gender in Ancient Egypt discussed the difficulty of assessing evidence for Egyptian attitudes around sexuality because of the inherent assumption that male/male sexual relations and desire would carry it with it specific traits associated with homosexuality in contemporary culture, as well as an inherent desire for modern archaeologists to validate modern stereotypes and sex politics through drawing lines of similarity to the ancient past. All of this is important but fairly standard for discussions of sexuality in ancient societies, but he raises some interesting points in his analysis of the scholarship surrounding the controversial burial of Niankhkhnunm and Khnumhotep, two men who were extremely close in life. This particular pair have been alternately identified as twins, brothers or lovers and generated a considerable amount of controversy in the process. Each were married and fathered children but the textual and artistic iconography surrounding their relationship transcends the intimacy usually attributed to siblings and the two occupy what is more akin to a double burial than the family tombs found elsewhere. Some archaeologists have pointed out that depictions of the two embracing and holding hands bear resemblances to similar images for husbands and wives, whereas others have pointed out that there is nothing inherently erotic about physical affection.
What I would bring up concerning this case is that the mentions of their wives and families do not preclude them having a romantic relationship, not just because such a relationship would not breach the bounds of marriage but because it is not uncommon for tombs to include mentions of multiple spouses in the case of divorce, polygamy or even death and remarriage. However, I would still err on the side of caution by not automatically assuming their being lovers, but this is an excellent example of the ambiguity of sexuality and relationships in Egypt, even the terminology surrounding lovers, spouses, and siblings is interchangeable in the Egyptian language which complicates identifying siblings from husbands and wives. This is why I bring up Dowson's apt observation that had Khnumhotep and Niankhkhnum been male and female the identification of their relationship as marriage would have been far less controversial but I also want to counter that it would have been an identification that was far more consistent with past research and finds.
But this controversy brings up another interesting point, sexuality in Egyptian art and literature is often presented in a subtextual and implicit manner, not as overtly as erotic themes in Greek and Roman art which means there is a far greater emphasis on the role the modern archaeologist and scholar has as the interpreter of the surviving information. This means that even at this point in time there are volumes of meaning still left to be unravelled from the published papyri and inscriptions, not to mention the even vaster reservoir of unpublished sources, and as with Khnumhotep and Niankhkhnum it may not always be clear what is being conveyed, approaching this as we are from a completely different mindset.