Miracle-dz/UniFAR-FTUs huggingface dataset:
Modernizing parallel code with pattern analysis

Fifty years of parallel programming has generated a substantial legacy parallel codebase, creating a new portability challenge: re-parallelizing already parallel code. Our solution exploits inherently portable parallel patterns, and addresses the challenge of identifying patternization opportunities in legacy parallel code via constraint matching on traced dynamic dataflow graphs. Notably, this makes the analysis source-independent and equally applicable to sequential and parallel legacy code. We identify various map and reduction patterns, including compositions, in Pthreads code. Experiments with the Starbench suite show that our analysis is effective (finding 86% of the patterns known in the literature), accurate (reporting actual patterns in 98% of the cases), and efficient (scaling linearly with the size of the execution traces). We re-express the found patterns via a parallel pattern library, making code freely portable across CPU/GPU systems and performing competitively with hand-tuned implementations at zero additional effort.
Investigating the semantics of futures in transactional memory systems

This paper investigates the problem of integrating two powerful abstractions for concurrent programming, namely futures and transactional memory. Our focus is on specifying the semantics of execution of "transactional futures", i.e., futures that execute as atomic transactions and that are spawned/evaluated by other (plain) transactions or transactional futures. We show that, due to the ability of futures to generate parallel computations with complex dependencies, there exist several plausible (i.e., intuitive) alternatives for defining the isolation and atomicity semantics of transactional futures. The alternative semantics we propose explore different trade-offs between ease of use and efficiency. We have implemented the proposed semantics by introducing a graph-based software transactional memory algorithm, which we integrated with a state of the art JAVA-based Software Transactional Memory (STM). We quantify the performance trade-offs associated with the different semantics using an extensive experimental study encompassing a wide range of diverse workloads.
PyLog: An Algorithm-Centric Python-Based FPGA Programming and Synthesis Flow

The exploding complexity and computation efficiency requirements of applications are stimulating a strong demand for hardware acceleration with heterogeneous platforms such as FPGAs. However, a high-quality FPGA design is very hard to create and optimize as it requires FPGA expertise and a long design iteration time. In contrast, software applications are typically developed in a short development cycle, with high-level languages like Python, which have much higher levels of abstraction than all existing hardware design flows. To close this gap between hardware design flows and software applications, and simplify FPGA programming, we create PyLog, a high-level, algorithm-centric Python-based programming and synthesis flow for FPGA. PyLog is powered by a set of compiler optimization passes and a type inference system to generate high-quality hardware design. It abstracts away the implementation details, and allows designers to focus on algorithm specification. PyLog takes in Python functions, generates PyLog intermediate representation (PyLog IR), performs several optimization passes, including pragma insertion, design space exploration, and memory customization, etc., and creates complete FPGA system designs. PyLog also has a runtime that allows users to run the PyLog code directly on the target FPGA platform without any extra code development. The whole design flow is automated. Evaluation shows that PyLog significantly improves FPGA design productivity and generates highly efficient FPGA designs that outperform highly optimized CPU implementation and state-of-the-art FPGA implementation by <inline-formula><tex-math notation="LaTeX">$3.17\times$</tex-math><alternatives><mml:math><mml:mrow><mml:mn>3</mml:mn><mml:mo>. </mml:mo><mml:mn>17</mml:mn><mml:mo>×</mml:mo></mml:mrow></mml:math><inline-graphic xlink:href="huang-ieq1-3123465.gif"/></alternatives></inline-formula> and <inline-formula><tex-math notation="LaTeX">$1.24\times$</tex-math><alternatives><mml:math><mml:mrow><mml:mn>1</mml:mn><mml:mo>. </mml:mo><mml:mn>24</mml:mn><mml:mo>×</mml:mo></mml:mrow></mml:math><inline-graphic xlink:href="huang-ieq2-3123465.gif"/></alternatives></inline-formula> on average.
Tensor Slices to the Rescue: Supercharging ML Acceleration on FPGAs

FPGAs are well-suited for accelerating deep learning (DL) applications owing to the rapidly changing algorithms, network architectures and computation requirements in this field. However, the generic building blocks available on traditional FPGAs limit the acceleration that can be achieved. Many modifications to FPGA architecture have been proposed and deployed including adding specialized artificial intelligence (AI) processing engines, adding support for IEEE half-precision (fp16) math in DSP slices, adding hard matrix multiplier blocks, etc. In this paper, we describe replacing a small percentage of the FPGA's programmable logic area with Tensor Slices. These slices are arrays of processing elements at their heart that support multiple tensor operations, multiple dynamically-selectable precisions and can be dynamically fractured into individual adders, multipliers and MACs (multiply-and-accumulate). These tiles have a local crossbar at the inputs that helps with easing the routing pressure caused by a large slice. By spending ~3% of FPGA's area on Tensor Slices, we observe an average frequency increase of 2.45x and average area reduction by 0.41x across several ML benchmarks, including a TPU-like design, compared to an Intel Agilex-like baseline FPGA. We also study the impact of spending area on Tensor slices on non-ML applications. We observe an average reduction of 1% in frequency and an average increase of 1% in routing wirelength compared to the baseline, across the non-ML benchmarks we studied. Adding these ML-specific coarse-grained hard blocks makes the proposed FPGA a much efficient hardware accelerator for ML applications, while still keeping the vast majority of the real estate on the FPGA programmable at fine-grain.
Lightweight preemptive user-level threads

Many-to-many mapping models for user- to kernel-level threads (or "M:N threads") have been extensively studied for decades as a lightweight substitute for current Pthreads implementations that provide a simple one-to-one mapping ("1:1 threads"). M:N threads derive performance from their ability to allow users to context switch between threads and control their scheduling entirely in user space with no kernel involvement. This same ability, however, causes M:N threads to lose the kernel-provided ability of implicit OS preemption---threads have to explicitly yield control for other threads to be scheduled. Hence, programs over nonpreemptive M:N threads can cause core starvation, loss of prioritization, and, sometimes, deadlock unless programs are written to explicitly yield in proper places. This paper explores two techniques for M:N threads to efficiently achieve implicit preemption similar to 1:1 threads: signal-yield and KLT-switching. Overheads of these techniques, with our optimizations, can be less than 1% compared with nonpreemptive M:N threads. Our evaluation with three applications demonstrates that our preemption techniques for M:N threads improve core utilization and enhance the performance by utilizing lightweight context switching and flexible scheduling of M:N threads.
A lock-free relaxed concurrent queue for fast work distribution

The operation of modern systems requires the low latency and high throughput of producer-consumer communication over shared memory. In order to achieve fast communication at high concurrency, we define a relaxed ordering model that splits the queue operations into two stages, the sequential assignment to queue slots and their subsequent concurrent execution. Based on this model, we design and implement the linearizable and lock-free algorithm called Relaxed Concurrent Queue Single (RCQS). We experimentally show that RCQS achieves factors to orders of magnitude advantage over the state-of-the-art queue algorithms in operation latency and item transfer speed.
Involving Students, Parents and Community in Career Development Services in Secondary Schools

ABSTRACT Working with groups of parents in career development services in secondary schools is rare practice and little researched. This article focuses on the pedagogy applied in one such intervention, “Parents Turn,” supporting family learning and community learning. The secondary analysis of qualitative data collected from parents has been used to evaluate the pedagogy on which the intervention was based. It shows that group work is feasible in a school-based intervention and reflects on some issues to enhance such parent-involved career development services in secondary schools.
HARTREE-FOCK (HF) METHOD AND DENSITY FUNCTIONAL THEORY CALCULATIONS OF METHANOL TO GASOLINE (MTG) REACTION

ت دقل ـ انلصو ةيكيمانيدلا ةيرارحلا تافصلا ضعب نع ةريثم جئاتن ىلإ ثحبلا اذه يف ) ∆rH, ∆rG, ∆rS ( دوقولا ىلإ لوناثيملا لعافتب ةقلعتملا ) MTG ( نامارو ءارمحلا تحت ةعشلأا فايطأ ىلإ ةبسنلاب كلذكو ، يريثيلإا لثيملا يئانثو لوناثيملل . يرتراه تاباسح انمدختسا ،جئاتنلا هذهل لوصوللو – ةفاثكلا ةيرظنو ،كوف ةددعتم ةيباسح تايوتسم دنع ةيفيظولا . جئاتنلا هذه حيضوت ىلإ ثحبلا اذه يف انيعس دقو . مادختسا مت دقو نايسواج جمانرب 98 تاباسح لمعل LCAO-MO-SCF ةيتلآا تايوتسملا دنع ) RHF/3-21g ، RHF/6-31g ، DFT/B3LYP/d95** . ( رتراه نم ةديقم تاباسح رايتخا متو دنع كوف ي ) RHF/3-21g and RHF/631g ( ىلعلأا تايوتسملا لثم ايضيوعت ةفلكم ريغ اهنلأ ) DFT/B3LYP/d95** . ( كوف يرتراه ةلاح يفو تايوتسم دنع تاباسحلا لمع نكل ،عقوتم  رمأ اذهو ، ايئزج جئاتنلا نيسحت ىلإ ةيدعاق تاعومجم مادختسا ىدأ ىلعأ ) DFT/B3LYP/d95** ( كوف يرتراه نم اريثك عضولا نم ريغي لا . كوف يرتراه تاباسح نإف اذلو ةيداحلأا ةيزاغلا ةلاحلا يف تائيزجلا تاباسحل لوبقم بيرقت ربتعت ةديقملا . ةيرظنلا فايطلأا ةنراقمب انمق دقو ةيلمعملا براجتلا نع ةجتاتلا فايطلأاب يريثيلإا لثيملا يئانثلو لوناثيملل ةجتانلا .
Photo-oxidation from mode-locked laser exposure to hTERT-RPE1 cells

Human retinal pigment epithelial (RPE) cells (hTERT-RPE1) were used to detect photo-oxidation products generated from chronic NIR (810 nm) laser exposure. Exposure of a discrete area within cell monolayers provided a means of distinguishing fluorescence above background levels. Oxidative stress was detected using the fluorescent dye H2DCF-DA and its analog CM-H2DCF-DA. Fluorescence was detected in cells exposed to mode-locked (76 MHz, ~160 femtoseconds) but not CW laser exposure. Detection of photo-oxidation from the mode-locked laser was dependent upon radiant exposure, but only if irradiance was greater than a threshold value. The CM-H2DCF-DA dye proved a more sensitive indicator of oxidation than H2DCF-DA, and the radiant exposure threshold for detection was dependent upon dye concentration. No oxidation was detected from CW exposures (using the most sensitive fluorescent dye conditions) when using 3 times the irradiance, and 10 times the radiant exposure needed to detect fluorescence from mode-locked exposure.
Subgroup Invariant Perturbation for Unbiased Pre-Trained Model Prediction

Modern deep learning systems have achieved unparalleled success and several applications have significantly benefited due to these technological advancements. However, these systems have also shown vulnerabilities with strong implications on the fairness and trustability of such systems. Among these vulnerabilities, bias has been an Achilles’ heel problem. Many applications such as face recognition and language translation have shown high levels of bias in the systems towards particular demographic sub-groups. Unbalanced representation of these sub-groups in the training data is one of the primary reasons of biased behavior. To address this important challenge, we propose a two-fold contribution: a bias estimation metric termed as Precise Subgroup Equivalence to jointly measure the bias in model prediction and the overall model performance. Secondly, we propose a novel bias mitigation algorithm which is inspired from adversarial perturbation and uses the PSE metric. The mitigation algorithm learns a single uniform perturbation termed as Subgroup Invariant Perturbation which is added to the input dataset to generate a transformed dataset. The transformed dataset, when given as input to the pre-trained model reduces the bias in model prediction. Multiple experiments performed on four publicly available face datasets showcase the effectiveness of the proposed algorithm for race and gender prediction.
Maintaining Optimal Mammary Gland Health and Prevention of Mastitis

In dairy industry, quality of produced milk must be more important than quantity without a high somatic cells count (SCC) or pathogens causing mastitis of dairy cows and consumer diseases. Preserving the good health of dairy cows is a daily challenge for all involved in primary milk production. Despite the increasing level of technological support and veterinary measures, inflammation of the mammary gland–mastitis, is still one of the main health problems and reasons for economic losses faced by cow farmers. The mammary gland of high-yielding dairy cows requires making the right decisions and enforcing the proper measures aimed at minimizing external and internal factors that increase the risk of intramammary infection. Due to the polyfactorial nature of mastitis related to its reduction, the effectiveness of commonly used antimastitis methods tends to be limited and therefore it is necessary to find the areas of risk in udder health programs and monitoring systems. Only by implementing of complete udder health programs should be accompanied by research efforts to further development these complete udder health control. The present review analyses the current knowledge dealing with damping and prevention of mastitis include SCC control, proper nutrition, housing and management, milking and drying as practiced in dairy farming conditions. This information may help to improve the health of the mammary gland and the welfare of the dairy cows as well as the production of safe milk for consumers.
Between a Rock and a Hard Place: Considering “Freebirth” During Covid-19

Background: The global coronavirus (Covid-19) pandemic concerns all people, but has a specific effect on those who are expecting a baby during this time. The advice in the UK changed rapidly, with 14 different sets of national guidance issued within 1 month. Individual NHS Trusts released various guidance relating to the withdrawal of homebirth services, the closure of birth centers, restrictions on the number of birth partners (if any) allowed during labor, and whether any visitors were allowed to attend after birth. With the landscape of maternity care changing so rapidly, research was carried out to provide real-time data to capture the lived experiences of expectant families. Methods: A mixed methods online survey was carried out over 2 weeks between 10th and 24th April 2020. The survey was open to those in the third trimester of pregnancy, those who had given birth since the beginning of the “lockdown” period in the UK, and the partners of pregnant women and people who were in these circumstances. The survey asked questions about how respondents' holistic antenatal experiences had been affected, whether their plans for birth had changed, and the effect of these changes on respondents' emotional wellbeing. Of the 1,700 responses received, 72 mentioned that they had seriously considered “freebirthing” (giving birth without a healthcare professional present). Findings: An analysis of the respondents' reasons for considering freebirth was conducted, finding that reasons for considering freebirth were complex and multifaceted. Lesbian, bisexual, pansexual, and queer women were more likely to have considered freebirth than heterosexual people (p < 0.001). Conclusions: Considering giving birth without a healthcare professional present is unusual in the Global North and represents an emerging field of study. The literature examining the reasons that people consider freebirth shows a variety of underlying motivations. A global pandemic represents a new factor in such considerations. The findings from this research can help inform maternity service planning in future crises.
A Monte Carlo Model of Gas-Liquid-Hydrate Three-phase Coexistence Constrained by Pore Geometry in Marine Sediments

Gas hydrates form at relatively high pressures in near-surface, organic-rich marine sediments, with the base of the hydrate stability field and the onset of partial gas saturation determined by temperature increases with depth. Because of pore-scale curvature and wetting effects, the transition between gas hydrate and free gas occurrence need not take place at a distinct depth or temperature boundary, but instead can be characterized by a zone of finite thickness in which methane gas bubbles and hydrate crystals coexist with the same aqueous solution. Previous treatments have idealized pores as spheres or cylinders, but real pores between sediment grains have irregular, largely convex walls that enable the highly curved surfaces of gas bubbles and/or hydrate crystals within a given pore to change with varying conditions. In partially hydrate-saturated sediments, for example, the gas–liquid surface energy perturbs the onset of gas–liquid equilibrium by an amount proportional to bubble-surface curvature, causing a commensurate change to the equilibrium methane solubility in the liquid phase. This solubility is also constrained by the curvature of coexisting hydrate crystals and hence the volume occupied by the hydrate phase. As a result, the thickness of the three-phase zone depends not only on the pore space geometry, but also on the saturation levels of the hydrate and gaseous phases. We evaluate local geometrical constraints in a synthetic 3D packing of spherical particles resembling real granular sediments, relate the changes in the relative proportions of the phases to the three-phase equilibrium conditions, and demonstrate how the boundaries of the three-phase zone at the base of the hydrate stability field are displaced as a function of pore size, while varying with saturation level. The predicted thickness of the three-phase zone varies from tens to hundreds of meters, is inversely dependent on host sediment grain size, and increases dramatically when pores near complete saturation with hydrate and gas, requiring that interfacial curvatures become large.
Do Musicians and Non-musicians Differ in Speech-on-Speech Processing?

Earlier studies have shown that musically trained individuals may have a benefit in adverse listening situations when compared to non-musicians, especially in speech-on-speech perception. However, the literature provides mostly conflicting results. In the current study, by employing different measures of spoken language processing, we aimed to test whether we could capture potential differences between musicians and non-musicians in speech-on-speech processing. We used an offline measure of speech perception (sentence recall task), which reveals a post-task response, and online measures of real time spoken language processing: gaze-tracking and pupillometry. We used stimuli of comparable complexity across both paradigms and tested the same groups of participants. In the sentence recall task, musicians recalled more words correctly than non-musicians. In the eye-tracking experiment, both groups showed reduced fixations to the target and competitor words’ images as the level of speech maskers increased. The time course of gaze fixations to the competitor did not differ between groups in the speech-in-quiet condition, while the time course dynamics did differ between groups as the two-talker masker was added to the target signal. As the level of two-talker masker increased, musicians showed reduced lexical competition as indicated by the gaze fixations to the competitor. The pupil dilation data showed differences mainly in one target-to-masker ratio. This does not allow to draw conclusions regarding potential differences in the use of cognitive resources between groups. Overall, the eye-tracking measure enabled us to observe that musicians may be using a different strategy than non-musicians to attain spoken word recognition as the noise level increased. However, further investigation with more fine-grained alignment between the processes captured by online and offline measures is necessary to establish whether musicians differ due to better cognitive control or sound processing.
Pre- and Postoperative Models for Prediction of Recurrence in Non-B, Non-C Hepatocellular Carcinoma

Background and Aims The incidence of non-B, non-C hepatocellular carcinoma (NBNC-HCC) is increasing. Like in hepatitis B virus (HBC)/HCV-associated HCC, treatment of NBNC-HCC after resection is challenging due to its high recurrence rate. However, few studies on the recurrence of NBNC-HCC have been published in the past decades. Hence, we aimed to investigate the risk factors for recurrence of NBNC-HCC and construct pre- and postoperative prognostic models for predicting recurrence in these patients who underwent curative resection. Methods We retrospectively analyzed 608 patients who underwent liver resection for NBNC-HCC. A multivariate Cox proportional hazard regression analysis was conducted to identify the independent risk factors of recurrence, based on which the prediction nomogram models were constructed and validated. The predictive performance of the models was assessed using the concordance index, time-dependent receiver operating characteristic curve, prediction error cure, and calibration curve. To facilitate clinical use, we stratified the patients into three distinct risk groups based on the score of the models. The cutoff scores of the models were determined by a survival tree analysis. Results Multivariable analysis identified neutrophil-to-lymphocyte ratio, alpha fetoprotein, tumor number, and tumor diameter as independent preoperative risk factors for recurrence. In addition to these variables, microvascular invasion was an independent postoperative risk factor for recurrence. The pre- and postoperative nomograms were constructed based on these variables. The C-index of the pre- and postoperative nomograms was 0.689 and 0.702 in the training cohort, 0.682 and 0.688 in the validation cohort, respectively, which were both higher than those of the conventional Barcelona Clinic Liver Cancer (BCLC) and 8th edition of the American Joint Committee on Cancer (AJCC8th) staging systems. In addition, the pre- and postoperative nomograms could also re-stratify patients with BCLC stage 0/A or AJCC8th stage IA/IB/II into distinct risk groups. Conclusions We constructed pre- and postoperative prognostic models for predicting recurrence in patients with NBNC-HCC who underwent curative resection. They can play a supplementary role to the traditional staging system.