@@ -154,16 +154,16 @@ __setup_fbgemm_gpu_test () {
154
154
155
155
# Configure the environment for ignored test suites for each FBGEMM_GPU
156
156
# variant
157
- if [ " $fbgemm_gpu_variant " == " cpu" ]; then
157
+ if [ " $fbgemm_build_variant " == " cpu" ]; then
158
158
echo " [TEST] Configuring for CPU-based testing ..."
159
159
__configure_fbgemm_gpu_test_cpu
160
160
161
- elif [ " $fbgemm_gpu_variant " == " rocm" ]; then
161
+ elif [ " $fbgemm_build_variant " == " rocm" ]; then
162
162
echo " [TEST] Configuring for ROCm-based testing ..."
163
163
__configure_fbgemm_gpu_test_rocm
164
164
165
165
else
166
- echo " [TEST] FBGEMM_GPU variant is ${fbgemm_gpu_variant } ; configuring for CUDA-based testing ..."
166
+ echo " [TEST] FBGEMM_GPU variant is ${fbgemm_build_variant } ; configuring for CUDA-based testing ..."
167
167
__configure_fbgemm_gpu_test_cuda
168
168
fi
169
169
@@ -189,9 +189,6 @@ __setup_fbgemm_gpu_test () {
189
189
190
190
echo " [TEST] Checking imports ..."
191
191
(test_python_import_package " ${env_name} " fbgemm_gpu) || return 1
192
- if [ " $fbgemm_gpu_variant " != " genai" ]; then
193
- (test_python_import_package " ${env_name} " fbgemm_gpu.split_embedding_codegen_lookup_invokers) || return 1
194
- fi
195
192
196
193
# Set the feature flags to enable experimental features as needed
197
194
__set_feature_flags
@@ -251,21 +248,19 @@ __run_fbgemm_gpu_tests_in_directory () {
251
248
__determine_test_directories () {
252
249
target_directories=()
253
250
254
- if [ " $fbgemm_gpu_variant " != " genai" ]; then
255
- target_directories+=(
256
- fbgemm_gpu/test
257
- )
258
- fi
259
-
260
- if [ " $fbgemm_gpu_variant " == " genai" ]; then
251
+ if [ " $fbgemm_build_target " == " genai" ]; then
261
252
target_directories+=(
262
253
fbgemm_gpu/experimental/example/test
263
254
fbgemm_gpu/experimental/gemm/test
264
255
fbgemm_gpu/experimental/gen_ai/test
265
256
)
257
+ else
258
+ target_directories+=(
259
+ fbgemm_gpu/test
260
+ )
266
261
fi
267
262
268
- echo " [TEST] Determined the testing directories:"
263
+ echo " [TEST] Determined the test directories:"
269
264
for test_dir in " ${target_directories[@]} " ; do
270
265
echo " $test_dir "
271
266
done
@@ -274,14 +269,10 @@ __determine_test_directories () {
274
269
275
270
test_all_fbgemm_gpu_modules () {
276
271
env_name=" $1 "
277
- fbgemm_gpu_variant=" $2 "
278
272
if [ " $env_name " == " " ]; then
279
- echo " Usage: ${FUNCNAME[0]} ENV_NAME [FBGEMM_GPU_VARIANT] "
273
+ echo " Usage: ${FUNCNAME[0]} ENV_NAME"
280
274
echo " Example(s):"
281
275
echo " ${FUNCNAME[0]} build_env # Test all FBGEMM_GPU modules applicable to to the installed variant"
282
- echo " ${FUNCNAME[0]} build_env cpu # Test all FBGEMM_GPU modules applicable to CPU"
283
- echo " ${FUNCNAME[0]} build_env cuda # Test all FBGEMM_GPU modules applicable to CUDA"
284
- echo " ${FUNCNAME[0]} build_env rocm # Test all FBGEMM_GPU modules applicable to ROCm"
285
276
return 1
286
277
else
287
278
echo " ################################################################################"
@@ -295,14 +286,13 @@ test_all_fbgemm_gpu_modules () {
295
286
# shellcheck disable=SC2155
296
287
local env_prefix=$( env_name_or_prefix " ${env_name} " )
297
288
298
- # Determine the FBGEMM_GPU varaiant if needed
299
- if [ " $fbgemm_gpu_variant " == " " ]; then
300
- echo " [TEST] FBGEMM_GPU variant not explicitly provided by user; will automatically determine from the FBGEMM_GPU installation ..."
301
- # shellcheck disable=SC2086
302
- fbgemm_gpu_variant=$( conda run ${env_prefix} python -c " import fbgemm_gpu; print(fbgemm_gpu.__variant__)" )
303
- echo " [TEST] Determined FBGEMM_GPU variant from installation: ${fbgemm_gpu_variant} "
304
- echo " [TEST] Will be running tests specific to this variant ..."
305
- fi
289
+ # Determine the FBGEMM build target and variant
290
+ # shellcheck disable=SC2086
291
+ fbgemm_build_target=$( conda run ${env_prefix} python -c " import fbgemm_gpu; print(fbgemm_gpu.__target__)" )
292
+ # shellcheck disable=SC2086
293
+ fbgemm_build_variant=$( conda run ${env_prefix} python -c " import fbgemm_gpu; print(fbgemm_gpu.__variant__)" )
294
+ echo " [TEST] Determined FBGEMM_GPU (target : variant) from installation: (${fbgemm_build_target} : ${fbgemm_build_variant} )"
295
+ echo " [TEST] Will be running tests specific to this target and variant ..."
306
296
307
297
# Determine the test directories to include for testing
308
298
__determine_test_directories
@@ -312,9 +302,9 @@ test_all_fbgemm_gpu_modules () {
312
302
313
303
# Iterate through the test directories and run bulk tests
314
304
for test_dir in " ${target_directories[@]} " ; do
315
- cd " ${test_dir} " || return 1
316
- __run_fbgemm_gpu_tests_in_directory " ${env_name} " " ${fbgemm_gpu_variant} " || return 1
317
- cd - || return 1
305
+ cd " ${test_dir} " || return 1
306
+ __run_fbgemm_gpu_tests_in_directory " ${env_name} " || return 1
307
+ cd - || return 1
318
308
done
319
309
}
320
310
0 commit comments