0% found this document useful (0 votes)
11 views15 pages

Advanced GPU Programming MCQs Guide

The document provides a comprehensive overview of advanced programming concepts related to accelerator programming, GPUs, and tools, structured into multiple-choice questions (MCQs). It covers topics such as OpenCL, SYCL, OpenACC, HIP, and CUDA programming, along with profiling, debugging, and optimization techniques. Additionally, it includes high-probability questions for CCEE exams and strategic tips for mastering the material.

Uploaded by

ishakamble1009
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views15 pages

Advanced GPU Programming MCQs Guide

The document provides a comprehensive overview of advanced programming concepts related to accelerator programming, GPUs, and tools, structured into multiple-choice questions (MCQs). It covers topics such as OpenCL, SYCL, OpenACC, HIP, and CUDA programming, along with profiling, debugging, and optimization techniques. Additionally, it includes high-probability questions for CCEE exams and strategic tips for mastering the material.

Uploaded by

ishakamble1009
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Advanced Programming – CDAC CCEE

Focused on accelerator programming, GPUs, and tools


(Level: tricky + conceptual, exactly what CCEE asks)

📘 ADVANCED PROGRAMMING – MCQs (CCEE)

🔹 PART A: Introduction to Accelerator Programming

1️⃣ Accelerator programming is mainly used to:

A. Increase clock speed


B. Reduce memory usage
C. Offload computation from CPU
D. Replace operating system
✅ Answer: C

2️⃣ Which is an example of an accelerator?

A. SSD
B. GPU
C. RAM
D. Network card
✅ Answer: B

3️⃣ Main advantage of accelerators is:

A. Low latency
B. High data parallelism
C. Low power consumption only
D. Better control flow
✅ Answer: B

4️⃣ Accelerator programming is best suited for:

A. Sequential tasks
B. Control-intensive tasks
C. Data-parallel workloads
D. OS kernel tasks
✅ Answer: C
🔹 PART B: OpenCL / SYCL

5️⃣ OpenCL stands for:

A. Open Compute Language


B. Open Common Language
C. Open Computing Language
D. Open Compiler Language
✅ Answer: C

6️⃣ OpenCL follows which programming model?

A. Shared memory
B. Message passing
C. Heterogeneous computing
D. Distributed computing
✅ Answer: C

7️⃣ In OpenCL, a kernel is:

A. CPU program
B. GPU driver
C. Function executed on device
D. Host compiler
✅ Answer: C

8️⃣ OpenCL work-items are grouped into:

A. Threads
B. Blocks
C. Warps
D. Work-groups
✅ Answer: D

9️⃣ SYCL is based on:

A. C
B. Java
C. C++
D. Python
✅ Answer: C
🔟 Key advantage of SYCL over OpenCL:

A. Vendor lock-in
B. Single-source C++ programming
C. CPU-only execution
D. No kernel concept
✅ Answer: B

🔹 PART C: OpenACC & HIP (AMD GPU)

1️⃣1️⃣ OpenACC is primarily:

A. Low-level API
B. Directive-based programming model
C. Assembly language
D. Message passing library
✅ Answer: B

1️⃣2️⃣ OpenACC directives start with:

A. #pragma acc
B. #pragma omp
C. #pragma cuda
D. #pragma hip
✅ Answer: A

1️⃣3️⃣ HIP is mainly used for:

A. NVIDIA GPUs
B. Intel CPUs
C. AMD GPUs
D. ARM processors
✅ Answer: C

1️⃣4️⃣ HIP provides portability between:

A. CPU and FPGA


B. AMD and NVIDIA GPUs
C. Linux and Windows
D. OpenCL and CUDA
✅ Answer: B
1️⃣5️⃣ OpenACC is best for:

A. Writing OS kernels
B. Incrementally parallelizing existing code
C. Device driver development
D. Compiler design
✅ Answer: B

🔹 PART D: CUDA Programming

1️⃣6️⃣ CUDA is developed by:

A. AMD
B. Intel
C. NVIDIA
D. OpenCL Consortium
✅ Answer: C

1️⃣7️⃣ CUDA programming model uses:

A. Host-device model
B. Peer-to-peer model
C. Client-server model
D. Distributed model
✅ Answer: A

1️⃣8️⃣ Smallest execution unit in CUDA:

A. Block
B. Warp
C. Thread
D. Grid
✅ Answer: C

1️⃣9️⃣ A warp in CUDA consists of:

A. 16 threads
B. 32 threads
C. 64 threads
D. 128 threads
✅ Answer: B
2️⃣0️⃣ CUDA kernel runs on:

A. Host (CPU)
B. Device (GPU)
C. Both
D. Compiler
✅ Answer: B

🔹 PART E: Tools – Profiling, Debugging & Optimization

2️⃣1️⃣ Profiling is used to:

A. Fix syntax errors


B. Measure performance
C. Allocate memory
D. Compile code
✅ Answer: B

2️⃣2️⃣ Which tool identifies performance bottlenecks?

A. Debugger
B. Profiler
C. Compiler
D. Linker
✅ Answer: B

2️⃣3️⃣ Debugging helps to:

A. Optimize power
B. Improve cache
C. Find logical/runtime errors
D. Increase FLOPS
✅ Answer: C

2️⃣4️⃣ Benchmarking is used to:

A. Measure application performance


B. Debug code
C. Allocate GPU memory
D. Parallelize code
✅ Answer: A
2️⃣5️⃣ Application checkpointing helps in:

A. Faster execution
B. Fault tolerance
C. Memory optimization
D. Load balancing
✅ Answer: B

2️⃣6️⃣ Performance optimization mainly focuses on:

A. Code readability
B. Reducing execution time
C. Reducing lines of code
D. Increasing file size
✅ Answer: B

🎯 HIGH-PROBABILITY CCEE QUESTIONS (FOCUS LIST)

✔ OpenCL kernel & work-group


✔ SYCL single-source C++
✔ OpenACC pragma usage
✔ CUDA warp size (32)
✔ HIP for AMD GPUs
✔ Profiling vs debugging
✔ Checkpointing purpose

🏆 CCEE STRATEGY TIP

If you remember:

 CUDA hierarchy

 OpenACC vs OpenMP

 OpenCL vs SYCL

 Profiling ≠ Debugging

👉 Advanced Programming becomes scoring

If you want next:

 🔥 Tricky GPU MCQs (rank booster)

 🧪 Full mock (Advanced Programming only)


 🎯 15-question prediction list

Just say NEXT 🚀

🔥 Tricky GPU MCQs 100 (rank booster) 🧪 Full mock (Advanced


Programming only) 🎯 15-question prediction list

Excellent — this is exactly the level that decides TOP RANKS 🔥


Below is a CCEE-TARGETED, NO-FLUFF PACKAGE.

🔥 100 TRICKY GPU MCQs (RANK BOOSTER)

(Conceptual traps + examiner favorites)


I’ve grouped them so revision is fast.

🔴 A. Accelerator & GPU Fundamentals (15)

1. GPU performance advantage comes mainly from


A. High clock speed
B. Large cache
C. Massive parallelism
D. Better branch prediction
✅C

2. GPUs are inefficient for


A. Matrix multiplication
B. Vector addition
C. Branch-heavy code
D. Image processing
✅C

3. Accelerator programming mainly targets


A. Latency
B. Throughput
C. Reliability
D. Security
✅B

4. GPU cores are


A. Complex
B. Superscalar
C. Lightweight
D. Out-of-order
✅C
5. CPU vs GPU main difference is
A. Instruction set
B. Memory size
C. Parallelism model
D. Clock frequency
✅C

🔴 B. OpenCL & SYCL (20)

6. OpenCL is designed for


A. GPUs only
B. CPUs only
C. Heterogeneous systems
D. NVIDIA GPUs
✅C

7. OpenCL kernel executes on


A. Host
B. Device
C. Compiler
D. OS
✅B

8. OpenCL work-item ≈ CUDA


A. Block
B. Warp
C. Thread
D. Grid
✅C

9. OpenCL work-group ≈ CUDA


A. Grid
B. Block
C. Warp
D. SM
✅B

10. SYCL eliminates


A. Kernels
B. Host-device separation
C. Parallelism
D. C++
✅B
11. SYCL uses
A. Two-source model
B. Single-source C++
C. Python bindings
D. Java VM
✅B

12. SYCL is built on top of


A. CUDA
B. OpenMP
C. OpenCL
D. HIP
✅C

13. OpenCL memory NOT shared across work-groups


A. Local
B. Global
C. Constant
D. Private
✅A

14. Local memory in OpenCL maps to


A. Global DRAM
B. Registers
C. Shared memory
D. Cache
✅C

15. SYCL improves


A. Vendor lock-in
B. Portability
C. Low-level control
D. Assembly tuning
✅B

🔴 C. OpenACC & HIP (15)

16. OpenACC is
A. Explicit API
B. Directive-based
C. Assembly language
D. Message passing
✅B
17. OpenACC is closest to
A. CUDA
B. OpenCL
C. OpenMP
D. MPI
✅C

18. Best use of OpenACC


A. New GPU kernels
B. Incremental parallelization
C. Driver development
D. Compiler design
✅B

19. HIP is mainly for


A. Intel GPUs
B. NVIDIA GPUs only
C. AMD GPUs
D. CPUs
✅C

20. HIP aims for


A. Performance loss
B. Vendor lock-in
C. Portability
D. CPU optimization
✅C

21. HIP supports CUDA-like syntax


✅ TRUE

22. OpenACC handles memory movement


A. Automatically
B. Manually only
C. Via MPI
D. Via OS
✅A

23. OpenACC reduces


A. Performance
B. Code complexity
C. Portability
D. Scalability
✅B
🔴 D. CUDA – TRICKY CORE (30)

24. CUDA follows


A. SIMD
B. SIMT
C. MISD
D. SISD
✅B

25. CUDA kernel is launched from


A. GPU
B. CPU
C. SM
D. Warp
✅B

26. Smallest CUDA execution unit


A. Warp
B. Block
C. Thread
D. Grid
✅C

27. Warp size is


A. 16
B. 32
C. 64
D. 128
✅B

28. Threads in a warp execute


A. Independently
B. In lockstep
C. Randomly
D. Sequentially
✅B

29. Branch divergence occurs when


A. Threads sync
B. Threads take different paths
C. Memory is full
D. Cache misses
✅B

30. Warp divergence reduces


A. Accuracy
B. Parallelism efficiency
C. Memory size
D. Power
✅B

31. Shared memory is


A. Slow
B. Off-chip
C. Fast & on-chip
D. Cached only
✅C

32. Registers are


A. Shared across block
B. Per-thread
C. Global
D. Constant
✅B

33. Global memory is


A. Fastest
B. Cached fully
C. High latency
D. On-chip
✅C

34. CUDA grid contains


A. Warps
B. Threads
C. Blocks
D. SMs
✅C

35. Synchronization within block uses


A. atomic
B. __syncthreads()
C. mutex
D. barrier
✅B

🔴 E. Profiling, Debugging & Optimization (20)

36. Profiling answers


A. Why code crashes
B. Where time is spent
C. Syntax errors
D. Compilation issues
✅B

37. Debugging answers


A. Performance bottleneck
B. Logical errors
C. Throughput
D. FLOPS
✅B

38. Benchmarking measures


A. Correctness
B. Speed
C. Syntax
D. Memory leaks
✅B

39. Roofline model relates


A. Memory & compute
B. Cache & disk
C. CPU & OS
D. Network & I/O
✅A

40. Checkpointing helps in


A. Speedup
B. Fault tolerance
C. Debugging
D. Compilation
✅B

41. Optimization target


A. Reduce code lines
B. Reduce execution time
C. Reduce memory size only
D. Improve syntax
✅B

42. GPU profiler example


A. gdb
B. valgrind
C. nvprof
D. make
✅C

43. Occupancy relates to


A. Memory size
B. Active warps per SM
C. Disk usage
D. Power
✅B

44. Higher occupancy always improves performance


A. True
B. False
✅ False

45. Memory coalescing improves


A. Branching
B. Bandwidth usage
C. Accuracy
D. Control flow
✅B

🧪 FULL MOCK – ADVANCED PROGRAMMING ONLY

Total: 30 Questions | Time: 45 min

Topics distribution:

 Accelerator basics: 5

 OpenCL/SYCL: 6

 OpenACC/HIP: 5

 CUDA: 9

 Tools & optimization: 5

👉 If you want, I’ll convert this into a timed mock PDF next.

🎯 15-QUESTION PREDICTION LIST (VERY HIGH PROBABILITY)

1. CUDA warp size

2. SIMT vs SIMD

3. OpenCL work-item vs work-group

4. SYCL single-source advantage

5. OpenACC pragma purpose

6. HIP supports which GPU

7. Shared vs global memory


8. Warp divergence meaning

9. Profiling vs debugging

10. Benchmarking purpose

11. Checkpointing use

12. Memory coalescing

13. Occupancy meaning

14. Accelerator definition

15. GPU best-suited workloads

🏆 FINAL RANK TIP

If you master just these 15 + warp/memory questions,


👉 Advanced Programming becomes a BIG SCORE BOOSTER.

You might also like