-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Hello,
i am trying to execute ML workloads from scikit-library and want to see what performance benefits inside the enclave by using the n_jobs parameter for RandomForrestClassifier. In native execution with Python I have a performance improvement roughly of 50% when doubling the number of threads (n_jobs). However, for the execution inside SGX with Gramine I get the same performance for 1, 2, 4, 8, and 16 threads / jobs. Is it possible to use n_jobs inside SGX with Gramine?
For my manifest template I tried both, passing loader.env.OMP_NUM_THREADS with the environment variable and assigning it directly:
a)
loader.insecure__use_host_env = true
loader.insecure__use_cmdline_argv = true
loader.env.OMP_NUM_THREADS = { passthrough = true }
b)
loader.env.OMP_NUM_THREADS = "8"
Besides that, I have set sgx.max_threads=128 and increased my enclave_size to 64GB. From scikit-learn I understand that n_jobs can also be set with OMP_NUM_THREADS. Am I doing something wrong in the manifest template or is it just not possible to use n_jobs with Gramine?
Thanks in advance and best regards,
Robert Kubicek