Sébastien Derégnaucourt
email: sebastien.deregnaucourt@u-paris10.fr

Colline Poirier

Anne Van Der Kant

Annemie Van Der Linden

Manfred Gahr

Comparisons of different methods to train a young zebra finch (Taeniopygia guttata) to learn a song

Keywords: birdsong, learning, playback, vocal plasticity, testosterone, zebra finch

Like humans, oscine songbirds exhibit vocal learning. They learn their song by imitating conspecifics, mainly adults. Among them, the zebra finch (Taeniopygia guttata) has been widely used as a model species to study the behavioural, cellular and molecular substrates of vocal learning. Various methods using taped song playback have been used in the laboratory to train young male finches to learn a song. Since different protocols have been applied by different research groups, the efficiency of the studies cannot be directly compared. The purpose of our study was to address this problem. Young finches were raised by their mother alone from day post hatching (dph) 10 and singly isolated from dph 35. One week later, exposure to a song model began, either using a live tutor or taped playback (passive or self-elicited). At dph 100, the birds were transferred to a common aviary. We observed that one-to-one live tutoring is the best method to get a fairly complete imitation. Using self-elicited playback we observed high inter-individual variability; while some finches learned well (including good copying of the song model), others exhibited poor copying. Passive playback resulted in poor imitation of the model.

We also observed that finches exhibited vocal changes after dph 100 and that the range of these changes was negatively related to their imitation of the song model. Taken together, these results suggest that social aspects are predominant in the success outcome of song learning in the zebra finch.

Introduction

Local dialects or geographical variation provided an early clue that birdsong might be learned. But it was when birds were raised in controlled conditions in the laboratory and their vocalizations were analyzed with the spectrograph that it was clearly demonstrated [START_REF] Catchpole | Bird song: biological themes and variations[END_REF][START_REF] Zeigler | Neuroscience of birdsong[END_REF]. [START_REF] Thorpe | The process of song learning in the Chaffinch as studied by means of the sound spectrograph[END_REF] was the first to demonstrate that young chaffinches (Fringilla coelebs) raised in social isolation failed to produce the normal song characteristic of their species. Since Thorpe's pioneering works in the fifties, young oscine songbirds of several dozens of species have been brought into the laboratory and reared in strictly controlled auditory environments to examine how their experience affected their songs. In nearly all cases, young songbirds deprived of song models develop abnormal songs, although some species-specific song features may be preserved [START_REF] Brainard | What songbirds teach us about learning[END_REF]. It was discovered that some species learn song only during a sensitive phase of early life whereas others have the possibility to transform their songs during their whole life [START_REF] Brainard | What songbirds teach us about learning[END_REF][START_REF] Catchpole | Bird song: biological themes and variations[END_REF]. Songbird species differ also in their readiness to copy songs from tape-recordings and from live tutors (for a review, see [START_REF] Baptista | Social interaction and vocal development in birds[END_REF]. Some bird species learn conspecific songs from a loudspeaker easily (canaries Serinus canaria [START_REF] Mundinger | Behaviour-genetic analysis of canary song: inter-strain differences in sensory learning, and epigenetic rules[END_REF] chaffinches Fringilla coelebs: [START_REF] Thorpe | The learning of song patterns by birds, with especial reference to the song of the chaffinch Fringilla coelebs[END_REF]; white-crowned sparrows Zonotrichia leucophrys [START_REF] Marler | A comparative approach to vocal learning: song development in whitecrowned sparrows[END_REF]; nightingales Luscinia megarhynchos: [START_REF] Todt | Conditions affecting song acquisition in Nightingales (Luscinia megarhynchos L.)[END_REF]; marsh wrens Cistothorus palustris: [START_REF] Brenowitz | Brain space for learned song in birds develop independently of song learning[END_REF]swamp sparrows Melospiza Georgiana: [START_REF] Marler | Sensitive periods for song acquisition from tape recordings and live tutors in the swamp sparrow, Melospiza georgiana[END_REF]; song sparrows Melospiza melodia: Marler and Peters, 1987; red-winged blackbirds Agelaius phoeniceus: [START_REF] Marler | Effects of acoustical stimulation and deprivation on song development in red-winged blackbirds (Agelaius phoeniceus)[END_REF]. In other species (Treecreepers Certhia spp. [START_REF] Thielke | Lernen von Gesang als möglicher Schrittmacher der Evolution[END_REF]; Bullfinches Pyrrhula pyrrhula: [START_REF] Nicolai | Familientradition in der Gesangsentwicklung des Gimpels (Pyrrhula pyrrhula)[END_REF], tutoring by tape-recording appears to be virtually ineffective. Passive playback of tape-recordings has several advantages: one can control the timing of sound exposure, the quality and the amount of songs that are broadcast to the young bird [START_REF] Derégnaucourt | Birdsong learning in the laboratory, with especial reference to the song of the zebra finch (Taeniopygia guttata)[END_REF]. This method was useful to show that some bird species do learn songs during particular time windows known as sensory phases [START_REF] Kroodsma | Environmentally dependent sensitive periods for avian vocal learning[END_REF]). Nevertheless, it has been shown that the timing of song acquisition in birds trained by passive playback could be extended beyond the limits if the young bird is subsequently exposed to live tutors [START_REF] Baptista | Social interaction, sensitive phases and the song template hypothesis in the white-crowned Sparrow?[END_REF].

Several studies show that mere proximity, that is, spatial association, is necessary for song sharing [START_REF] Hausberger | Song sharing reflects the social organization in a captive group of European starlings (Sturnus vulgaris)[END_REF] and social learning [START_REF] Mann | Song tutor choice by zebra finches in aviaries[END_REF]. Song acquisition processes also depend on the biology of each species. For example, it is likely that learning from tapes is possible in species that learn their song from their neighbours under natural conditions, with whom they do not interact physically and/or visually [START_REF] Derégnaucourt | Birdsong learning in the laboratory, with especial reference to the song of the zebra finch (Taeniopygia guttata)[END_REF].

Among songbirds, song acquisition in the zebra finch (Taeniopygia guttata) has received a lot of interest. This tiny bird is easy to breed in captivity. Its song is short (1-1.5 sec) and very stereotyped. Young male zebra finches learn their song during a sensitive period of early life and it is believed that once the bird is about 90 days old, its song crystallizes and will not change for the remainder of its life [START_REF] Zann | The zebra finch: a synthesis of field and laboratory studies[END_REF]. Early results suggested that young zebra finches would not learn from passive playback of tape recordings [START_REF] Immelmann | Song development in the zebra finch and other estrildid finches[END_REF][START_REF] Eales | The influences of visual and vocal interaction on song learning in zebra finches[END_REF]. However, significant learning was observed in subsequent studies despite high inter-individual variability [START_REF] Bolhuis | Song learning with audiovisual compound stimuli in zebra finches[END_REF]Houx and ten Cate, 1999a, b;[START_REF] Houx | Variations in zebra finch song copying: an examination of the relationship with tutor song quality and pupil behaviour[END_REF][START_REF] Funabiki | Factors limiting song acquisition in adult zebra finches[END_REF]. Since Immelman's pioneering study in 1969, it has been assumed that the most important factor in the selection of a zebra finch song model is the close interaction between a young male and the male that rears him, generally his father [START_REF] Price | Developmental determinants of structure in zebra finch song[END_REF][START_REF] Böhner | Song learning in the zebra finch (Taeniopygia guttata): selectivity in the choice of a tutor and accuracy of song copies[END_REF]. Indeed, this bond will even override species-specificity since zebra finches will learn the song of a Bengalese finch (Lonchura striata) foster father, even if conspecifics share their breeding accommodation. Nevertheless, in controlled conditions, a young male can also learn the song of an adult male with whom he does not have physical contact or social attachment such as what develops between youngsters and the male that is feeding them [START_REF] Eales | Song learning in zebra finches: some effects of song model availability on what is learnt and when[END_REF]. Still, both visual and vocal interaction between young zebra finches and their tutors are important for the accuracy of song learning [START_REF] Eales | The influences of visual and vocal interaction on song learning in zebra finches[END_REF].

If fairly complete song imitation in the zebra finch has never been obtained with passive exposure to a song model, such results have been obtained using operant conditioning with song as a reward [START_REF] Adret | Operant conditioning, song learning and imprinting to taped song in the zebra finch[END_REF][START_REF] Tchernichovski | Dynamics of the vocal imitation process: how a zebra finch learns its song[END_REF][START_REF] Derégnaucourt | How sleep affects the developmental learning of bird song[END_REF].

There might be several reasons why passive playback failed so far to induce significant song learning in the zebra finch. First, the song playback sessions might be not done at the appropriate moment for the birds. Second, the playback quota might not be sufficient to capture the bird's attention. On several occasions investigators have emphasized that very good imitation is possible even when a model was presented a small number of times [START_REF] Petrinovitch | Factors influencing song development in the White-crowned Sparrow (Zonotrichia leucophrys)[END_REF][START_REF] Hultsch | Song acquisition and acquisition constraints in the nightingale, Luscinia megarhynchos[END_REF][START_REF] Peters | Song sparrows learn from limited exposure to song models[END_REF].

In zebra finches, in an operant conditioning context when the bird has to peck a key to trigger song playback, 40 playbacks of the song motif per day, lasting a total of 30 seconds, result in significant learning. More exposure leads to less complete imitation [START_REF] Tchernichovski | Vocal imitation in zebra finches is inversely related to model abundance[END_REF].

In our study we decided to test these hypotheses. Accordingly, we decided to play back song at moments that are predictable for the birds, namely, just after the lights switch on in the morning and just before the lights switch off in the evening. Also, we restricted the quota of daily song exposure. We will compare these results with those of birds trained with a procedure of operant conditioning, and also those of live-tutored birds.

Hormonal status is closely correlated to the end of the sensitive period for song learning and the crystallization of a stereotyped song in both open-ended (Marler et al., 1987) and age-limited song learners like the zebra finch [START_REF] Pröve | Hormonal correlates of behavioural development in male zebra finches[END_REF]. At dph 101, we measured testosterone levels and calculated correlations with song imitation, song stereotypy and singing activity. Early castration (Arnold, 1975a;[START_REF] Bottjer | Castration and antisteroid treatment impair vocal learning in male zebra finches[END_REF] and exogenous testosterone [START_REF] Korsia | Chronic testosterone treatment impairs vocal learning in male zebra finches during a restricted period of development[END_REF] both disrupt song learning in the zebra finch. In the same species, several studies suggest that high testosterone concentrations reduce the potential for vocal plasticity [START_REF] Korsia | Chronic testosterone treatment impairs vocal learning in male zebra finches during a restricted period of development[END_REF][START_REF] Williams | Testosterone decreases the potential for song plasticity in adult male zebra finches[END_REF]. We therefore expected that birds with low levels of testosterone would be less likely to have a stereotyped song. Also, castration of male finches decreases song rates, but normal singing activity is re-established after the castrated birds have been injected with testosterone (Arnold, 1975b;[START_REF] Pröve | Der Einfluss von Kastration und Testosteronsubstitution auf das Sexualverhalten männlicher Zebrafinken (Taeniopygia guttata castanotis Gould)[END_REF]. In our study, we checked whether there could be a link between testosterone levels and singing activity at dph 100.

After dph 101, the birds were placed in a common aviary with conspecifics.

Several weeks later, their song was recorded again to quantify eventual vocal changes.

Materials and methods

Study subjects

62 male zebra finches from 16 different breeding pairs of our colony were used for this study. Breeding pairs were maintained in separate cages (100 x 50 x 50cm) and nest control was made daily. The chicks were raised by both parents until dph 10 when the father was removed. The mother and the chicks were moved to another room in our institute, to avoid any imprinting of the young on male song. The breeding cages were maintained on LD 12:12 until the chicks fledged.

Experimental groups

On day 35, each chick was marked and the young males were isolated in an individual sound proof chamber (LD 12:12; lights on from 8am to 8pm). Food and water were provided ad libitum. Each bird stayed in social isolation until day 100 posthatching.

Birds in group 1 to 8 started training from day 43 (Table 1).

Birds in group 1 to 4 were exposed to a passive playback of 20 song models.

Birds in group 5 to 7 were trained with an operant conditioning procedure, with a daily exposure to 20 song models.

For groups 1 and 5, there were two daily playback sessions: one in the morning (starting at 8am) and one in the afternoon (starting at 2pm). During each playback session birds in group 1 were exposed to a passive playback of 10 songs, and only the first 10 key pecks were reinforced with song playback for group 5.

For groups 2 and 6, there was only one playback session in the morning, starting at 'lights on.' Birds in group 2 were exposed to a passive playback of 20 songs and birds in group 6 could peck the key only until 2pm.

For groups 3 (passive playback) and 7 (operant conditioning), there was only one playback session in the afternoon of 20 songs, starting at 2pm. Group 4 was exposed to the passive playback of 20 songs that ended one minute before 'lights off.' Some birds that trained using operant conditioning were subsequently used as song tutors for the live tutoring group (group 8). On day 43 of the pupil's life, one of these adult males was introduced to the sound-proof chamber and stayed with the pupil until dph 100.

After dph 100, birds were moved to a common aviary where they could freely interact with other males from the different experimental groups.

Several weeks to several months after the end of training, the birds were moved to soundproof chamber again for song recordings. After a week, they were moved back to their aviary.

Song recording and analysis

Song recording

Vocal activity of each individual bird was recorded using the Sound Analysis Pro software (SAP 2.0; [START_REF] Tchernichovski | Studying the song development process: rationale and methods[END_REF]. The program was run on a PC equipped with an Edirol UA1000 sound card (16 bits, sampling frequency: 44.1 kHz), connected to multidirectional Earthworks TC20 microphones (one per sound box) placed above the cage. Each bird's vocalizations were monitored continuously. To limit the recording of cage noises, we adjusted the settings of the software (amplitude and duration thresholds) such that mainly songs would be automatically identified and recorded.

Song files were then scanned using Sound Explorer (sound analysis software developed by René Jansen, University of Amsterdam) and only files containing song bouts were used for subsequent analysis.

Singing activity

Sound files recorded at dph 100 were visually scanned using Sound Explorer.

Only files containing song bouts were kept for the analysis. Using SAP we calculated the duration of each of these song bouts to get an overall score of singing activity for the whole day.

Motif analysis

We quantified how well pupils had copied their song model using a similarity score procedure in SAP [START_REF] Tchernichovski | A procedure for an automated measurement of song similarity[END_REF]. The overall similarity score is a product of 3 components: % similarity, mean accuracy and sequential match. Percentage of similarity is the percentage of tutor's sounds included in final sections. Mean accuracy is the average local similarity score across final sections. Sequential match is calculated by sorting the final sections according to their temporal order with reference to the song model, and then examining their corresponding order in the song motif.

For the live tutoring procedure, overall similarity score was calculated from 100 asymmetric pairwise comparisons of the pupil's typical motif (10 exemplars per bird) with the tutor motif (10 exemplars per bird). For the playback procedures, overall similarity score was calculated from 10 asymmetric pairwise comparisons of the pupil's typical motif to the song model broadcast. In asymmetric comparisons the most similar sound elements of two motifs are compared, independent of their position within a motif.

The smallest unit of comparison is 9.26-ms-long sound interval (FFT windows). Each interval is characterized by measures for five acoustic features: pitch, FM, amplitude modulation (AM), Wiener entropy, and Pitch Goodness. SAP calculates the Euclidean distance between all interval pairs from two songs, over the course of the motif, and determines a p-value for each interval pair. This p-value is based on p-value estimates derived from the cumulative distribution of Euclidean distances across 250,000 sound interval pairs, obtained from 25 random pairs of zebra finch songs.

Neighboring intervals that pass the p-threshold value (p = 0.1 in this study) form larger similarity segments (70 ms). The amount of sound from the song model that was included into the similarity segments represents the similarity score; it thus reflects how much of the material of the song model was found in the pupil's motif. To measure how accurately pupils copied the sound elements of the song model, we used the accuracy score from SAP. The accuracy score is computed locally, across short (9 ms) FFT windows and indicates how well the sound matched to the sound in the song model. SAP calculates an average accuracy value of the motif by averaging all accuracy values across the similarity segments.

Song stereotypy at dph 100

We used two methods to measure song stereotypy: (1) a measure based on a clustering procedure of sounds; (2): a measure of song syntax stereotypy based on amplitude shapes of singing bouts.

Measure of clustered sounds: we used the 'clustering' procedure of the SAP software [START_REF] Tchernichovski | Studying the song development process: rationale and methods[END_REF]. The original purpose of the 'clustering' procedure of SAP is to detect syllable types and to automatically trace vocal changes during song development. The nearest-neighbor hierarchal clustering method is implemented into an extensive graphic user interface including a display of clusters in color code, assessment of residuals, and an account of the number of members in each syllable type. In our study, song bouts recorded on dph 100 were segmented into syllables based on a threshold crossing of song power. We then ran the clustering procedure and took into account the % of residuals, namely the proportion of sounds that could not be attributed to any syllable type according to the clustering algorithm.

Syntax analysis: Measures of song syntax stereotypy have been designed for zebra finch song [START_REF] Scharff | A comparative study of the behavioral deficits following lesions of various parts of the zebra finch song system: implications for vocal learning[END_REF]. They require manual annotation of song sequences of syllables following visual observation of spectrograms. This task is relatively easy for adult birds with well-defined types of syllables, but is harder when song still contains plastic and unclassifiable sounds, which was the case in our study. To measure syntax stereotypy we selected for each bird ten song bouts and extracted 1 sec of sound starting from the 1 st syllable after the last introductory note. Then, following a modified version of a method recently published [START_REF] Kojima | Social performance reveals unexpected vocal competency in young songbirds[END_REF], the continuous time course of the amplitude envelope was compared among these 10 1-sec segments to obtain correlation coefficients (CCs) using a custom-made program written in Matlab. Finally, we took the mean of these 100 comparisons. We expected that the mean CCs among sound segments would be higher in finches that produce stereotyped sequence of syllables than in finches that produce more variable song sequences.

Song playback

We used three different song models (SM1, SM2 and SM3) for playback (Fig. 1A-C). Each song model consisted of two identical repetitions of a single song motif recorded from an adult bird. The number of birds trained with each song model is presented in table 1.

Three finches trained with SM1, 3 finches trained with SM2 and 4 finches trained with SM3 were used as song tutors for the live tutor group (group 8).

Hormone analysis

The absence of adult males for finches trained with song playback and the isolated housing conditions are both likely to have an effect on the circulating hormone levels of the young developing males [START_REF] Pröve | Der Einfluss sozialer Haltungsbedingungen auf die Balzaktivitat und Androgentiter mannlicher Zebrafinken (Taeniopygia guttata castanotis Gould). Verhandlungen der Deutsch[END_REF][START_REF] Livingston | Slow NMDA-EPSCs at synapses critical for song development are not required for song learning in zebra finches[END_REF], which could affect song learning and song stereotypy.

At dph 101, a blood sample (approx. 120 µl) was taken after venipuncture from the wing vein and collected into heparinized capillaries. Plasma was immediately separated by centrifugation and samples were then stored at -80˚C. Testosterone (T) concentration was determined by direct radioimmunoassay (RIA; [START_REF] Goymann | Testosterone and corticosterone during the breeding cycle of equatorial and European stonechats (Saxicola torquata axillaris and S. t. rubicola)[END_REF].

Statistics

We used a one-way ANOVA to compare learning success (similarity score with the song model) between the three methods: live-tutoring, operant conditioning and passive playback. The Tukey HSD test was used for post-hoc analysis. We used a twoway ANOVA to test the effect of time and song model on learning success for birds trained with passive playback and operant conditioning. The t-test was also used to compare learning success between two training schedules for the same method. We used linear regression to test correlations between different measures (similarity score at 100dph, similarity score after a 2 nd recording, singing activity, T level and other acoustic measures). General linear models were used to check whether there was a significant difference among training procedures regarding these correlations. We used the Kolmogorov-Smirnov test to check whether the data conformed to a normal distribution.

We conducted all analyses in SPSS version 17.0 (SPSS Inc., Chicago, IL, USA).

Results

Recordings at dph 100

Song imitation

We observed significant differences among tutoring regimes (Fig. 2A, one-way ANOVA, F(2,59)= 15.691, P< 0.0001). Birds trained with a live tutor learned better than birds trained with operant conditioning (Tukey HSD, P= 0.005) and passive playback (P< 0.001). Birds trained with operant conditioning did also learn better than birds trained with passive playback (P= 0.004). Close-to-perfect imitation of the song model was observed in finches trained with live tutoring and operant conditioning but not in finches trained with passive playback (Fig. 1).

Effect of song model and time of playback groups

For both groups (passive playback and operant conditioning), we did not observe significant differences among song models on the overall similarity score (song model: F(2,51)= 0.877, P= 0.423; interaction song model*method: F(2,51)= 1.423, P= 0.251).

For both groups there was also no effect of time of playback on song learning.

For the operant training group, birds trained with two daily sessions learned better than birds trained with one single daily session starting at lights on (Fig. 2B, t-test, t(27.812)= -2.198, P= 0.036).

For the passive playback group birds trained with song playback at the beginning of the light phase (one minute after lights on) did not learn better than birds trained at the end of the light phase (one minute before lights off) (Fig. 2C, t-test, t(13)= 2.036, P= 0.063).

Singing activity

Regarding singing activity, we did not find a significant correlation with the overall similarity score (Fig. 3A, linear regression, F(1,58)= 0.17, R= 0.054, P= 0.682), meaning that birds that did learn well were not the ones singing more at dph 100.

Testosterone levels

Regarding T level, there was no significant correlation either with overall similarity score (Fig. 3B,F(1,50)= 0.789, R= 0.125, P= 0.379) or singing activity (Fig. 3C,F(1,50)= 2.285, R= 0.209, P= 0.137).

There was no also significant correlation between T level respectively with mean CCs (Fig. 3D, linear regression, F(1,50)= 0.414, R= 0.091, P= 0.523) and % of residuals (unclustered sounds) (Fig. 3E,F(1,50)= 0.23, R= 0.068, P= 0.634). This suggests that birds with low levels of T at the end of the experiment did not have more plastic songs than birds with high levels of T.

Recordings after transfer to the aviary

We observed some changes in the acoustics of the songs produced by the finches trained with the various methods. If these changes were subtle in some birds (Fig. 4A and4B), some were more pronounced in others (Fig. 4C and4D).

There was a significant positive correlation between overall similarity score at dph 100 and self-similarity score (Fig. 5A, intra-individual comparison between song motif produced at dph 100 and song motif produced later, linear regression, F(1,40)= 59.246, R= 0.773, P< 0.001). This indicates that finches that did not provide a good imitation of the song model were more likely to change their song motif after dph 100 than birds that did provide a good imitation. There was no effect of training procedure on this result (general linear model, F(2,41) =1.687, P= 0.199).

Moreover, we found a significant negative correlation between self-similarity score and % of residuals after data clustering, indicating that birds that changed their song more after training were also those that produced more variable sounds that could not be clustered as distinct syllable types (Fig. 5B, linear regression, F(1,40)= 19.315, R= 0.571, P0.001). There was no significant difference between groups of birds trained with different methods (general linear model, F(2,41)= 0.614, P= 0.547). This could also be predicted at the end of the training phase since there was a significant negative correlation between similarity scores at dph 100 and residuals after clustering, meaning that birds that did provide a good imitation of the song model tended to produce more distinct (clustered) syllables than worse learners (Fig. 5C, linear regression, F(1,58)= 12.459, R= 0.421, p= 0.001). There was no significant difference between groups of birds trained with different methods (general linear model, F(2,59)= 1.364, P= 0.264).

Regarding song syntax stereotypy, we observed a significant positive correlation between self-similarity score (intra-individual comparison between song motif produced at 100dph and song motif produced later) and the mean of CCs (Fig. 5D, linear regression, F(1,40)= 33.946, R= 0.678, P< 0.0001). This indicates that finches that did not produce stereotyped sequences of song syllables at dph 100 were more likely to change their song after training than birds that did provide a good imitation. There was no effect of training procedure on this result (general linear model, F(2,41)= 0.690, P= 0.508). This could also be predicted at the end of the training phase since there was a significant positive correlation between similarity score at dph 100 and mean CCs, meaning that birds that did provide a good imitation of the song model tended to produce more syntax-stereotyped songs than worse learners (Fig. 5E, linear regression, F(1,58)= 20.869, R= 0.514, P< 0.0001). There was no significant difference between groups of birds trained with different methods (general linear model, F(2,59)= 1.155, P= 0.323).

Discussion

These results indicate that young male zebra finches learn poorly from passive tape playback even when timing and quota of song exposure are controlled. Better results are obtained when the bird can self-elicit tape playback using an operant conditioning procedure, despite a high inter-individual variability. One-to-one live tutoring is clearly the most effective method to get a close-to-perfect imitation of a song model. Moreover, the less the bird learned during the training period, the more likely it was to transform its song later when raised with conspecifics, highlighting again the importance of social factors on song development. Range of vocal changes could also be predicted at the end of the training period using different criteria to measure song stereotypy, but could not be predicted based solely on testosterone levels.

Vocal changes after training

The fact that live tutoring might extend sensitive periods beyond the limits defined by auditory stimulation alone is not new (Baptista andPetrinovitch, 1984, 1986) even in an age-limited learner such as the zebra finch [START_REF] Morrison | Role of a telencephalic nucleus in the delayed song learning of socially isolated zebra finches[END_REF][START_REF] Jones | Early experience and plasticity in adult male zebra finches (Taeniopygia guttata)[END_REF].

We observed that birds that did provide worse imitation of the song model were those that produced more unclustered sounds and were more likely to change their song as adults. This suggests that bad learning is not a consequence of a lack of plasticity but rather by a lack of an adequate song model provided during the sensitive phase. It does not necessarily mean that the method was inappropriate since even birds trained with a live tutor were likely to change their song when imitation was not fairly complete. We did not observe correlations between the different criteria of song stereotypy and testosterone level. In a previous experiment, Livingston and colleagues (2000) showed that isolated housing conditions delay testosterone increase during maturation, but that differences with normally raised conspecifics disappear in adults. In our study, it would have been interesting to look at the individual time course of testosterone levels.

The nature of the vocal changes after training is not clear: the finches might have learned from conspecifics but they might also have invented/improvised new sounds based on those produced before or after dph 100. More experiments are required to explore these aspects. Nevertheless, it has been observed in other studies that some of these vocal changes were syllables learned from conspecifics [START_REF] Morrison | Role of a telencephalic nucleus in the delayed song learning of socially isolated zebra finches[END_REF][START_REF] Jones | Early experience and plasticity in adult male zebra finches (Taeniopygia guttata)[END_REF].

Overall, vocal changes after the so-called sensitive period in birds trained with tapes permitted [START_REF] Baptista | Social interaction, sensitive phases and the song template hypothesis in the white-crowned Sparrow?[END_REF] to emphasize that live models can be more effective than playbacks.

Passive playback

Finches trained with passive playback exhibited the worst learning scores. Passive playback has long been thought to be inefficient in zebra finches but both timing and quota of song exposure were not always controlled accurately. In particular, it was shown that overexposure to taped playback using the operant conditioning procedure could impair song learning [START_REF] Tchernichovski | Vocal imitation in zebra finches is inversely related to model abundance[END_REF]. Our results suggest that the inefficiency of passive playback is neither due to timing exposure, nor to sound quota.

Nevertheless, some learning occurred and there was also some inter-individual variability. The fact that birds trained with playback just before the night exhibited song learning indicate that immediate practice is not necessary in this species where the sensory phase and the sensorimotor phase completely overlap (Roper and Zann, 1996). In a recent experiment, Gehrold, Leitner, Laucht and Derégnaucourt (submitted) succeeded in training young male zebra finches, kept in the same housing conditions as in this study, to imitate short parts of a canary song bout. This suggests that some learning can also occur when the young male zebra finch cannot interact with its environment either through a reward obtained in self-eliciting song playback or through live interactions with a conspecific.

Innacuracies in song imitation

Innacuracies in song imitation observed in the laboratory might have different causes that are not mutually exclusive [START_REF] Derégnaucourt | Birdsong learning in the laboratory, with especial reference to the song of the zebra finch (Taeniopygia guttata)[END_REF]: (1) the methods used to train the bird to imitate a song may not be appropriate; (2) the bird might have memorized the song model but will not produce it; (3) it does not make sense, biologically speaking, to provide a fairly complete imitation. In the zebra finch (and other oscine species), studies have confirmed hypotheses (1) and (2). For example, it has been shown that both good learners and bad learners exhibit a preference for the song model they have been exposed to during the sensitive period [START_REF] Adret | Operant conditioning, song learning and imprinting to taped song in the zebra finch[END_REF]Houx and ten Cate, 1999a). Tutor song preference can still be observed one year after the birds have been separated from their tutor [START_REF] Gobes | Birdsong memory: a neural dissociation between song recognition and production[END_REF]. Males could learn the complete tutor song but not incorporate all of the tutor song elements into their own song [START_REF] Nelson | Selection-based learning in bird song development[END_REF][START_REF] Geberzahn | Latent song type memories are accessible through auditory stimulation in a hand-reared songbird[END_REF]. This assumption was rejected by Terpstra and colleagues (1994) since they observed a positive correlation between gene ZENK expression in NCM (an auditory area) and quality of imitation of the tutor song following exposure to the tutor song in adult finches. Also, inaccuracies in song imitation might facilitate individual recognition [START_REF] Böhner | Song learning in the zebra finch (Taeniopygia guttata): selectivity in the choice of a tutor and accuracy of song copies[END_REF]. Thus inaccuracies in song imitation should not always be considered as errors or deficits since they could be adaptive and even play a key role in the development of song cultures.

Live tutoring

In the starling (Sturnus vulgaris), passive playback enables vocal learning by isolated birds whereas learning is weak or inefficient when they are housed with a conspecific companion [START_REF] Poirier | Direct social contacts override auditory information in the song-learning process in Starlings (Sturnus vulgaris)[END_REF]. This might explain why passive playback was initially thought to be inefficient in the zebra finch [START_REF] Eales | The influences of visual and vocal interaction on song learning in zebra finches[END_REF][START_REF] Immelmann | Song development in the zebra finch and other estrildid finches[END_REF], but our results show that accurate imitation of a song model cannot be obtained using passive playback in singly isolated finches. Looking at the ultimate aspects of song learning might help to understand why passive playback is not effective and why social factors are so important in the zebra finch. In this species the strong resemblance between tutor and pupil song suggests that for a young bird it is important to produce accurate tutor learning rather than to obtain longer songs or larger repertoires [START_REF] Gil | Early condition, song learning, and the volume of song brain nuclei in the zebra finch (Taeniopygia guttata)[END_REF].

Even if song production is used during courtship displays to females [START_REF] Riebel | Song and female choice in zebra finches: a review[END_REF], there is no evidence that female zebra finches have a preference for particular syllables, as shown for example in canaries [START_REF] Vallet | Female canaries are sexually responsive to special song phrases[END_REF]. Song is not used in a territorial context [START_REF] Zann | The zebra finch: a synthesis of field and laboratory studies[END_REF]. One possible function is that song could constitute a group signature. Like zebra finches, starlings live in large social groups and also learn better from a live tutor than from taped songs [START_REF] Chaiken | Song acquisition in European starlings: a comparison of the songs of live-tutored, tape-tutored, untutored, and wild-caught males[END_REF]. In this species it was clearly demonstrated that song sharing reflects social affinities [START_REF] Eens | Song learning in captive European starlings, Sturnus vulgaris[END_REF][START_REF] Hausberger | Social influences on song acquisition and sharing in the European starling (Sturnus vulgaris)[END_REF]. These aspects need to be studied in zebra finches.

Developing new methods to train young finches to learn a song

Even if fairly complete imitation observed in the one-to-one tutoring is an artefact of captivity, it constitutes a baseline for researchers that use birdsong as a biological model to study the molecular, cellular and behavioural correlates of vocal learning. For example, using this paradigm, Haesler and colleagues (2007) found evidence the role of gene FoxP2 for song learning, establishing birdsong as an interesting model for speech dyspraxia. The problem with live tutoring is that one cannot control the behaviour of the tutor. The association of song with a stuffed model [START_REF] Bolhuis | Song learning with audiovisual compound stimuli in zebra finches[END_REF]Houx and ten Cate, 1999b) or a non-social visual stimulus [START_REF] Hultsch | Auditory-visual stimulus pairing enhances perceptual learning in a songbird[END_REF] confirms the importance of visual and/or auditory components that has been indicated in earlier studies [START_REF] Todt | Conditions affecting song acquisition in Nightingales (Luscinia megarhynchos L.)[END_REF][START_REF] Eales | The influences of visual and vocal interaction on song learning in zebra finches[END_REF] and that could be involved in a process of associative learning. Since social interactions also appear predominant in the song learning process of the zebra finch, new methods should also take into account these aspects. There is a

Legends of figures

Fig. 1 .

 1 Fig. 1. Spectrograms of songs produced by adult male zebra finches. A to C: three song motifs produced by three different males. These songs were used as song models for the experiment. D: song of the best learner from the live tutor group. E: song of the best learner from the operant training group. F: song of the best learner from the passive playback group.

Fig. 2 .

 2 Fig. 2. Comparison of the different methods used to train a young zebra finch to learn a song. A: similarity, accuracy and sequential match to the song model for finches trained with the three different methods: live tutoring, operant conditioning and passive playback. B: similarity, accuracy and sequential match to the song model for two groups of birds trained with operant conditioning: one daily session of 20 key pecks (starting in the morning) and two daily sessions of 10 key pecks each (one in the morning and one in the afternoon). C: similarity, accuracy and sequential match to the song model for two

Fig. 3 .

 3 Fig. 3. Singing activity, testosterone level and song stereotypy at the end of the training phase. A: correlation between overall similarity scores and singing activity. B: correlation between overall similarity score and testosterone level. C: correlation between singing activity and testosterone level. D: correlation between song syntax stereotypy (mean CCs) and testosterone level. E: correlation between unclustered sounds and testosterone level. See the text for details about the acoustic measures.

Fig. 4 .

 4 Fig. 4. Spectrograms of songs produced by adult male zebra finches. A and B: two exemplars of songs produced by the same male at dph 100 (A) and several months later after transfer to aviary. In the case of this bird, changes in the acoustic structure of the song were subtle. C and D: songs of the bird that exhibited the most changes in its song following transfer to aviary after 100 dph. C: song at dph 100; D: song recorded several months later.

Fig. 5 .

 5 Fig. 5. Changes in the acoustic structure of the song following transfer to aviary after 100 dph. A: correlation between overall similarity score at dph 100 and self-similarity score. B: correlation between unclustered sounds at dph 100 and self-similarity score. C: correlation between unclustered sounds at dph 100 and overall similarity score at 100 dph. D: correlation between mean CCs at dph 100 and self-similarity score. E: correlation

Acknowledgements

We would like to thank Arthur Leblois for having organized the workshop and for giving us the opportunity to participate in this special issue. We thank Ofer Tchernichovski and Olga Fehér for their valuable comments on a previous draft of the manuscript. We thank Benjamin Treuhaft for reviewing our English manuscript. This research was supported by the Max-Planck Society.

between mean CCs at dph 100 and self-similarity score. See the text for details about the acoustic measures.


Cyril Crassin
email: cyril.crassin@imag.frfabrice.neyret@imag.fr

Fabrice Neyret

-=== Understanding G80 behavior and performances ===

Keywords: 3, Methodology 4, Experiments 5, Recommendations

Motivations

Criticality of optimization on GPU is very different than for CPU due to the extremely high performance contrasts. GPUs have "fast paths": Unintuitive depressing 1000x slowdown as compared to expectations or after a small change are often met when programming. Conversely, knowing these fast paths can lead to more than 1000x speedup. G80 series can be even less intuitive regarding this issue since it can very efficiently hide some unoptimalities (via threading) up to the point where suddenly it can no longer. To find and remain in these fast paths, it is important to understand how the GPUs work and behave. In particular, we were interested in how fragments are scheduled among G80 stream processors.

Summary of our "interpretations and discoveries"

(See Figure 4 for the general organization).

-The rasterizer allocates fragments to texture processors (pairs of multiprocessors) based on the location on screen: screen is subdivided in tiles of size 16x16 which are bounds to TPs according to a fix pattern (see Figure 3).

-For one given TP, the flow of fragments is assembled in warps of 32 threads then stored in a FIFO.

-Warps of one FIFO are executed by any of the two MPs of the TP.

-Threading can use shader wait-states (texture access, transcendent maths, pipeline dependencies) to run some warps partly in parallel on the same MP.

-In the general case, warp fragments are not geometrically ordered and can correspond to any location within the screen footprint of a TP (see Figure 6).

-In facts, fragments are managed in groups of 2x2 (4x2?) "superfragments". In particular, points, lines and triangle borders yield some waste since "ghost fragments" are generated to fill superfragments and are treated as regular threads (with no output).

-For unknown reason, only 4 isolated points or primitives of size 1 can fit a warp (8 were expected).

-If one FIFO is full the rasterizer has to wait, which might starve the other TPs (see Figure 2).

Methodology

We wrote a small probe program "fragSniffer" allowing us to trigger various configuration tests providing 2 kinds of outputs:

-Showing fragment writing order into the front-buffer, comprising locks, stalls, synchronizations.

-Measuring performance changes when changing configuration parameters.

The principle is to use very slow fragment shaders (doing simple additions into a user controlled loop, typically 10^6 iterations). In particular, some of our fragment shaders get slow only for one pixel on screen, or for a couple of pixels. In case of several slow pixels, these can run either the same shader instructions or 2 different branches of a conditional statement. Speed, number of slow pixels and their location, as well as speed of "background fragments" can all be controlled manually.

Tested configurations concern the pattern and relative location of slow pixels, and also the type of primitive drawn on screen: large or small, stripped or not, 2D,1D or 0D, traced in smart, raster or shuffle order, tiling the screen or overlapping. Note that due to the use of extremely slow shaders, the cost of CPU, bus transfer and vertex transform is negligible.

Our probe tool fragSniffer is freely available here: http://www.icare3d.org/FragSniffer/FragSniffer_0.2.zip

The board used for our experiments was a 8800 GTS: it has 96 Stream processors (SP), grouped by 8 working in SIMD into 12 Multi Processors (MP), which are paired as 6 Texture Processors (TP). Threads are scheduled on Multi Processors into Warps of 32 threads executed in SIMD (within 4 cycles) on the 8 SPs of the MP (see CUDA manual for more details).

We also run our probe on other boards, e.g. a 8600M GT having 16 SP grouped into 4 MP =2 TP just to verify that results were consistent.

Disclaimer:

The G80 is a quite complex ecosystem we tried to locally understand by running these experiments. We might have misinterpreted some behaviors, conducted some inappropriate experiments, or even incorrectly designed or run some of them. Please don't blame us for that, do not hesitate to correct and complete ! We provide our observations and conclusions for that you can trace our reasoning. We provide our probing tool so that you can verify our data. Also, don't hesitate to run your own new experiments to improve the collective understanding ! A dedicated forum is available on the web site.

In particular, we tested only performances relative to brute scheduling of fragments, using shaders with no texture or memory access, no complex maths, and shaped so as to saturate the internal SP pipeline.

Experiments

In the following, "reference time" is the rendering duration for one triangle covering the whole window. We used a 512x512 window 16-aligned with screen pixels.

E1: One single big Quad

We draw a single full screen quad.

* Observations:

-The two quad triangles are draw one after the other (the triangle diagonal is strictly respected) .

-The left triangle is drawn in left-right ping-pong scanline while the right triangle is drawn in classical scanline.

-(Note that if another window hides a part of our window, the hidden part of the scanline is done at cost 0). -Scanline is made at the granularity of 16x16 "tiles", 2 rows of tiles at a time.

-Tiles are filled progressively through a "curtain effect" made of horizontal segments (see Figure 1). -Tiles and their "curtain segments" are drawn in parallel and asynchronously along this "thick" scanline.

-When "blocking" one fragment with a very long shader, 16x16 black tiles appear every 6 tiles in rasterization order starting with the tile containing the blocked fragment (see Figure 2). These tiles are totally black but the first.

-Tiles are relative to the screen (not to the window, thus our alignment of the window location).

-In the first blocked tile 8x4 "sub tiles" appears (the "horizontal curtain segments"), organized in the tile as 2 columns of 4 subtiles (see Figure 3). The first blackened subtile is the one containing the slow fragment (or sometimes the one before), then the followings.

-After a few lines of drawn tiles with 1 missing every 6 tiles, all tiles get blocked as long of the slow fragment has not terminated its execution (see Figure 2).

-The board auto-resets and flush the pipeline if the drawing of the quad is not no finished before a timeout of 8-10 seconds.

E1.3: Using 2 slow pixels and cost 0 for other fragments . Let's call T the duration of each of the conditional branches these 2 pixels correspond to.

-If the two pixels fall in different tiles, total frame cost is T -Except if these are tiles Ti and Ti+6j in raster order in which case it is 2T (for small j) -If the two pixels fall in the same subtile, total frame cost is 2T -If the two pixels fall in different subtiles of the same tile, total frame cost is T (with a surcost of about 10% for vertical neighbors instead of horizontal neighbors) (1) Same, taking care of writing shaders with no wait state[*1] (e.g. result of additions not needed for the next instruction):

-If the two pixels fall in different tiles, total frame cost is T -If the two pixels fall in the same subtile, total frame cost is 2T -If the two pixels fall in subtiles in different column of the same tile, total frame cost is T (2) -If the two pixels fall in subtiles in same column of the same tile, total frame cost is 2T (3) E1.4: Using 4 slow pixels and cost 0 for other fragments (see Figure 5).

-If the four pixels fall in different neighbor tiles, total frame cost is T -If the four pixels fall in the same subtile, total frame cost is 4T -If the four pixels fall in the same column, total frame cost is 4T -If the two pixels fall in a column (either in the same subtile or not) and two in the other, total frame cost is 2T E1.5: Using 32 slow fragments running the same shader in the same subtile: total frame cost is T

* Conclusions:

-For large primitives, fragments are scheduled on multiprocessors grouped by tiles of 16x16 pixels aligned on screen coordinates.

-One tile is treated by a TP, i.e. a pair of MP.

-tiles are allocated to MP depending only of their screen location (1 every 6 rasterized tiles, even if MP load is unbalanced).

-The pattern of allocation of tiles is presented of Figure 3 (it was obtained using a test not described here). It can be formulated as Tile(i,j)=(i-i0+N(j-j0))%6 with N(j) ={0,2,4,1,5,3}[j%6]. Note that it ensures a distance of 6 between mappings of the same tile horizontally or vertically, and of at least 4 in L1-distance in any direction.

-Inside a tile, fragments are scheduled in 8x4 subtiles[*2] corresponding to warps of 32 threads. 32 threads in a warp run in parallel [*3].

-The subtiles of one column[*2] is run by one MP and the other ones by the other MP in parallel. (cf (2) vs (3)).

-Subtiles in a column are run in sequence.

-The fact that all MP get blocked after a few lines waiting for the termination of the slow fragment seems to be due to a synchronization issue. We think that the rasterizer fills per-TP FIFO buffers. When one FIFO is full (due to the busy MP calculating the slow fragment) the rasterizer stops feeding the FIFOs. Once all non-blocked MP have consume their FIFO they starve: the G80 stalls until the slow fragment calculation finishes. See the general scheme on Figure 4. [*1]: Internally, one given shader instruction takes time to calculate (11 cycles), which is hidden thanks to the the internal SP pipe-line (ideally, one result per cycle). If an instruction yields a wait state (texture access, transcendent function call, use of a result just calculated) this would waste cycles. Instead, the MP processes the next warp during this spare time. Thus, 2 warps can seem to be evaluated in parallel. It is not the case if the shader has no wait state (thus (1) vs (3)).

[*2]: We will see later that this organization in 8x4 subtiles (packed in two columns) is only valid for this very experiment with an ideal primitive filling all the tiles. More generally, warps contain 32 fragments coming in order of rasterization (see Figure 6) and can be executed on any of the two MP of the pair.

[*3]: A reminder that a G80 has only 8 SP per MP so that only 8 threads are run in parallel at the silicon level. But 32-thread warps are considered at low-level by processing each given instruction on 4 threads in a row per SP. This is like emulating a 32-SP multiprocessor running 4 times slower. Note that it is not threading as in [*1].

[*]: In Cuda threads are grouped in rigid blocks allocated to a given MP. We wonder where they map here: tiles ? FIFO ?

In the following, we always use shaders with no wait state.

E2: Smaller and micro primitives

We draw smaller screen-aligned quads (or triangles) tiling the screen. We test different sizes and configurations and we measure the total rendering time for a frame. E2.1: The cost of "background fragments" is set to 10^5 loop iterations.

E2.2:

We introduce one slow pixel which cost is set to 10^6.

* Observations: E2.1:

-One big (clipped) triangle covering all screen: 1.17s (= reference time).

-Small quads drawn on raster order : -size 64x64, 32x32, 16x16, 8x8 = 1.5s (ref time+~25%), 4x4=6.78, 1x1~=9.96 (8x ref time) -for sizes smaller than 16x16, raster order within 16x16 then raster order within the window:

-size 8x8: same cost.

-Quads translated by 1 pixel horizontally.

-size 64x64, 32x32, 16x16, 8x8 = 1.85s (+25%+25%), 4x4=7.82 -Two non-stripped triangles instead of quads: same timings.

E2.2:

-Concerning the pattern of black tiles and the FIFO stalling:

-For tiles >16x16 the behavior is as E1.

-For tiles < 16x16 the pattern is obfuscated due to the small size of drawing primitives. Still, the "mod 6" MP allocation and the FIFO stalling behaves the same.

-The number of tiles which can be drawn before stalling while one MP is blocked decrease together with quad size.

-If quads are grouped in sets of GL_Begin...GL_End drawing batch, the drawing of all MPs seems to wait the end of a batch before starting the next one (otherwise visual synchronization occurs only at FIFO stall as before). Looking at the performances, it does not seems that all MPs always wait.

* Conclusions:

-Type of triangles connection (strip vs nostrip) has no impact on pattern and on performances: it seems that no special optimization if done for strips so that they are considered as separate drawing primitives. for instance, a quad is considered as 2 separate triangles. This yields some waste, see discussion in [*4] at the end of the next section.

* Unexplained:

-Scheduling through MPs is done per drawing batch (glBegin...glEnd). A partial synchronization is done at the end of the batch. We do not understand the partial impact on performances.

-The +25% extra cost is logical for 8x8 quads: it corresponds to the filling of superfragments along the diagonal of the two triangles which doubles the number of diagonal superfragments.

Same thing for the the extra +25% for the 1-pixel translation: One fragment row of a new quad (bad parity alignment) enters the tile, which doubles the row superfragments.

But why these results for other sizes ?

Now we want to test the scheduling with less organized primitives: lines and points. A remainder that reference time corresponds to one single triangle covering the screen.

E3: Lines drawing

E3.1: We draw horizontal lines filling the screen from bottom to top.

E3.2:

We draw vertical stacks of lines ("pseudo-quads") from left to right and from bottom to top.

* Observations

-2x the reference time for lines of length 512.

-Lines split in segments of length 32, 16, 8, 4: same cost. Length 2: cost +125% (4.5x the ref time) -"Pseudo quads" of size 256, 128: same cost.

-"Pseudo quads" of size 64: +8% size 16, 8, 4: +18% size 2: +125% (4.5x the ref time)

Size 1: +360% (9x the ref time).

* Conclusions:

-Only half of all SPs in a warp are used because vertical neighbors are not part of the same line primitive and thus cannot be evaluated by the neighbor SP. [*4] E3.2:

-Our hypothesis is that huge number of drawing primitives drawn at the same time may occasionally starve the other MPs and thus decrease the performances.

* Notes:

[*4]: DDX and DDY uncentered derivatives are obtained at no cost by combining values of the target variable evaluated at odd&even 4 neighbors. This yields that all "parity-neighbors" vertically and horizontally must belong to the same primitive (e.g. triangle or line). If these neighbors were not rasterized (considering the very same primitive), they are stored and calculated anyway for this very reason, forming an asymmetric "parity-bandguard" of 1 pixel. This impacts small primitives such as points (see next section), lines, micro-triangles, but also very probably contiguous larger primitives such as triangles in a mesh or in a quad (which pixels seem neighbor but cannot be recognized as such and thus cannot be let neighbor in the warp). We were expecting to see this only for nonstripped data, but performances and patterns are identical either stripped or non-stripped. So our hypothesis is that threads are *always* spoiled due to the parity-bandguard, which probably explains the lower performances for small primitives.

E4: Points drawing

E4.1 "Raster-bloc" of points: We draw points in lines from left to right and from bottom to top. E4.2 "pseudo-quads" of points: we "raster" quads with points, then screen with pseudo-quads.

* Observations

-Blocking a given point (with a very slow shader) shows a block of 4x1 pixel sub-tiles (instead of 8x4 for large triangles).

-Very few tiles drawn before a FIFO stall (when blocking a fragment).

-raster: 8x the reference time.

-pseudo-quads of size 128, 64, 32, 16: timing progressively increases up to 83% for size 16.

-pseudo-quads of size 8,2, 1: 8x the reference time.

* Conclusions

-Warps seems to be only filled only with 4 points, thus the slowdown.

-FIFO seems less efficient for small drawing primitives: the smaller the primitive, the less pixels drawn between pixel blocking and MPs stalling. We believe that FIFO elements correspond to pre-assembled warps. Warps are less efficients when a lot of superfragments are filled with gosh fragment. Moreover, warps can host only 4 points.

E4.2:

-Our hypothesis is that huge number of drawing primitives drawn at the same time may occasionally starve the other MPs and thus decrease the performances.

* Unexplained:

-Bandguard-alignment should limits to only 8 points (instead of 32) per warp due to the 4x4 superfragments, see [*4] in previous section.

So, why do we get only 4 ? Might it be that superfragments are in facts 4x2 ? This would also explain some timings, but would contradict other ones.

E4.3: Spaced points. We draw points spaced by n pixels in each directions. We measure the average duration per point as compared to the E4.1 "raster-bloc" as reference. E4.4: overdrawing points. We draw 512^2 points at the same pixel location and compare to the ref (on 512x512 points).

E4.5:

We draw 512^2 points cycling between 6 given different pixel locations falling on different TPs. -n=2,3,4,5,7,8: cost per point / ref =-3%, +8%, +0%, +5%, +16%, +10% (1) -n=16: +35% -Blocking a given point (with a very slow shader) shows 4x1 points sub-tiles.

* Observations

-E4.4: cost: 6.1x the ref (2) -E4.5: same cost than the ref (3)

* Conclusions

-Perf of ( 2) is due to the fact that only one TP is used. But both of its MPs are used, proving that these do not correspond to columns.

-"Holes" in tiles (1) or superimposing points (3) do not change performances too much (roughly): warps seem to be filled sequentially with points, independently of their location in the tile or even in the following tiles mapped on the same MP.

-As mentioned in [*2] we believe that this is probably the general mechanism, even for large primitive (in which case the location coherency within a warp is simply due to the order of fragments rasterization).

-Note that all size 1 primitives (quads, triangles, lines, points) consistently cost the same: 8x the reference time (still, we do not understand why it is not 4).

Examples of recommendations

Here we present some unoptimal situations due to the behaviors we have presented above. We suggest some idea on how the same drawing could be organized differently so to avoid the performance breakdown. The main purpose is to illustrate how different organizations and representations impact performances: these are not deeply tested universal recipes, don't apply them blindly ! They are meant to trigger ideas on how to organize your drawing algorithm differently. In particular, our tests were done on artificial shaders with no texture or memory access and saturating the pipeline. Some solutions good for such shaders might be very bad for shaders using intense memory access. For instance, shuffling locality in order to group similar tasks or to scatter costly tasks might be disastrous in terms of cache miss. Some typical unoptimal situations correspond to:

Numerous primitives: no parallelism

If each drawing primitive is a different drawing batch there is a loss of performance due to a (partial) synchronization of all MPs.

Poor use of SPs due to excess of "band-guard" threads

This typically occurs with micropolygons (e.g. size 1 to 4) and points. Overcost is typically x8. A solution is to rely on deferred shading: this allows to fill warps with 32 threads really corresponding to pixels.

5.3

Poor warp parallelism: one costly shader scattered on screen E.g., Let suppose a sky-night textured on a sky mesh, with a fancy shader to run at stars. (e.g.: if the intensity of the current texture pixel is above a threshold then a dynamic branching occurs to run a complex blinking). Let's assume the sky image is densely populated with N stars, and that the shader costs T for a star.

If each warp contains only one star, it costs the price of a star (no benefit of the 31 other SP). Total cost: NT/12 (parallelism through the 12 MP, no parallelism for stars in a warp or between warps or the same MP if the pipeline is saturated -note that in practice it is generally not the case so some gain occurs). Some other ways to draw this sky-night texture could be:

-Drawing stars with point primitives separately instead of included in the sky texture map: would allows to group 4 of them per warp.

-Using the sky texture as a mask and do 2 passes: draw first only star pixels then background pixels. (Such a mask must generate only the target pixels. This can be done using features such as early depth test). This should also gain 4.

-Pre-packing star texture pixels together and relying on an indirection map to encode the sky. Then do 2 passes: shading first the star block, then rendering the object mapped with the indirection texture. This should allow a gain closer to 32. Now let suppose a texture with 2 different scattered fancy shaders. Let each cost T. We now have a total of 2N stars. Let assume that we have N wraps containing 2 stars.

The fragment shader paints background texture pixel, a type 1 star or a type 2 star through different branches in a conditional statement. These cannot run in parallel in a warp due to SIMD (divergences during conditional or dynamic branchings are serialized). Using type 1 for all 2N stars, if each warp contains two stars it costs the price of one star. Total cost: NT/12.

If each warp contains one star of type 1 and one of type 2, it costs 2T. Total cost: 2NT/12. Drawing all type 1 stars then all type 2 stars using point primitives or stencil mask would gain 4 as in the previous case.

Poor load balance of MPs

-If one MP has more work than the other ones, he will finish later: the 11 other MPs will starve at the end of the drawing batch.

If the drawing batch was very big (i.e. very larger than 1500 pixels) this will probably have low impact on the total cost, but not for smaller ones.

-If one MP has a lot more work than the others: the FIFO will probably stall most of the time so that only one MP will be working. Still, it is not very likely to occur due to the scattered pattern of tile/MP mapping (see Figure 3).

-For a scattered very costly shader (like in 4.3) falling statistically on any MP, the effect on performances dramatically depends on the density as compared to the "FIFO window" (about 5000 pixels with our shader when drawing a large primitive):

-if several MPs are impacted by stars then this tends to balance the load.

-if only one MP is impacted the others will starve: Total cost for the "FIFO window" will be T instead of T/12.

-if one MP is impacted twice in the FIFO window, the general starvation will late twice.

Killing the parallelism: unique shaders poorly scattered on screen

E.g., ray-tracing relying on the traversal of some acceleration structure. Rays passing close to the silhouette of an object will traverse the worst of the structure without being stopped. The cost of these pixels is thus a lot more than any other fragment. The precise work for each very silhouette ray is unique. They are rather scattered on screen, but grouped along the silhouette curve. (All this is even worse with transparency or volume ray-tracing since silhouettes are thicker).

If one wants to implement such algorithm in a shader on GPU, we have a combination of bad cases 5.3 and 5.4: -A silhouette pixel might stall the whole FIFO.

-Several silhouette pixels are likely to fall in the same tile (and impact one single TP): stalling is even longer.

-These are even likely to fall in the same warp. Since the shaders for these pixels have different lives they are not running in parallel: their costs add, and so as the duration of the whole starvation.

Let suppose a vertical silhouette line of 16 pixels within a tile: This adds a cost of 16T to the rendering of the FIFO window. This is just like having one SP instead of 128. Thus in addition to being a lot more costly to render by themselves, silhouette pixels can have an overcost of 128 due to the starvation of the whole G80 but one SP.

A solution consists in detecting and re-scheduling very costly unique fragments. Still, the MP which will manage a given fragment is totally determined by fragment location on screen. Thus the only two solutions are:

-Better balancing the costly shaders in time:

-E.g. grouping & rendering them in a separate pass using point primitives. This will make heavy cost for warps, but well balanced through MPs so that the FIFO should not stall.

-This could also be done with a stencil mask and two passes.

-If the poor scattering still yields an unbalanced load, we can balance the load by adapting the drawing order of points (custom FIFO).

-Cheating the tile/MP mapping:

Let's assume a single TP was impacted in a FIFO window: the purpose is then to find how we can share the work with some other TPs.

-Drawing some of the costly pixels elsewhere on screen (so as to reach another tile) then copying+blending back.

-Could also be done with portions of each long shader.

-Drawing in several target buffers (FBO), using different spatial offsets (i.e. tile offset) for each buffer. Offsetting can be implemented by calculating in (i,j) the value targeted at pixel(i+di,j+dj).

-Using a dither pattern as a mask to draw some costly shaders in buff2 instead of buff1: pass1: if (!mask(i,j)) buff1:=shader(i,j); pass2:

if mask(i-16,j) buff2:=shader(i-16,j); then copy+blend buff2 on buff1.

-Split shaders: if shader was Part1(i,j)+Part2(i,j) both costly, use instead pass1: buff1:=Part1(i,j); pass2: buff2:=Part2(i-16,j); then copy+blend buff2 on buff1

Figure 3 :

 3 Figure 3: Screen subdivision in tiles spread among G80 MPs. Tiles subdivision into 8x4 pixels sub-tiles.

Figure 4 :

 4 Figure 4: General fragments scheduling scheme from rasterization fragments flow to MPs.

Figure 1 :

 1 Figure 1: Tiles "curtain" filing pattern

Figure 2 :

 2 Figure 2: A tile containing a very slow fragment (1) makes all next tiles scheduled on the same TP to wait. Others TPs continue their processing until their fragments FIFO is empty (2).

Figure 6 :

 6 Figure 6: Oh, a warp !

Figure 5 :

 5 Figure 5: Different blocking pixels (in red and yellow) configurations and resulting blocked warps (in orange)